Module: Releaf::Content::Node::Service

Extended by:
ActiveSupport::Concern
Includes:
Service
Included in:
Copy, Move, SaveUnderParent
Defined in:
app/services/releaf/content/node/service.rb

Instance Method Summary collapse

Instance Method Details

#add_error_and_raise(error) ⇒ Object

Raises:

  • (ActiveRecord::RecordInvalid)


11
12
13
14
# File 'app/services/releaf/content/node/service.rb', line 11

def add_error_and_raise(error)
  node.errors.add(:base, error)
  raise ActiveRecord::RecordInvalid.new(node)
end