Class: Person

Inherits:
ActiveRecord::Base show all
Defined in:
lib/vendor/plugins/rspec-rails/spec/resources/models/person.rb

Instance Method Summary collapse

Methods included from Spec::Rails::Extensions::ActiveRecord::ClassMethods

#records

Methods included from Resourceful::Serialize::Model

#serialize, #to_serializable

Methods included from Spec::Rails::Extensions::ActiveRecord::InstanceMethods

#errors_on

Instance Method Details

#add_animal(animal) ⇒ Object



12
13
14
15
16
# File 'lib/vendor/plugins/rspec-rails/spec/resources/models/person.rb', line 12

def add_animal animal
  animal.person = self
  animals << animal
  animal.save
end