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

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

Instance Method Summary collapse

Instance Method Details

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

:nodoc:



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

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

  super
end

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

:nodoc:



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

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

  super
end