Module: Protobuf::ActiveRecord::MassAssignmentSecurity::Persistence::ClassMethods

Defined in:
lib/protobuf/active_record/mass_assignment_security/persistence.rb

Instance Method Summary collapse

Instance Method Details

#create(attributes, options = {}, &block) ⇒ Object

:nodoc:



11
12
13
14
15
# File 'lib/protobuf/active_record/mass_assignment_security/persistence.rb', line 11

def create(attributes, options = {}, &block)
  attributes = attributes_from_proto(attributes) if attributes.is_a?(::Protobuf::Message)

  super(attributes, options)
end

#create!(attributes, options = {}, &block) ⇒ Object

:nodoc:



18
19
20
21
22
# File 'lib/protobuf/active_record/mass_assignment_security/persistence.rb', line 18

def create!(attributes, options = {}, &block)
  attributes = attributes_from_proto(attributes) if attributes.is_a?(::Protobuf::Message)

  super(attributes, options)
end