Class: Georgia::UpdateRevision::Contributor

Inherits:
Service
  • Object
show all
Defined in:
app/services/georgia/update_revision.rb

Instance Attribute Summary

Attributes inherited from Service

#revision

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

This class inherits a constructor from Georgia::UpdateRevision::Service

Instance Method Details

#callObject



36
37
38
39
40
41
42
# File 'app/services/georgia/update_revision.rb', line 36

def call
  if current_revision?
    raise Pundit::NotAuthorizedError, 'You must be at least an Editor to update a published revision.'
  else
    @revision.update(@attributes)
  end
end