mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-02 07:18:49 +01:00
Update has_many_polymorphs to 421dd0bd60b246652bbbafd64724ebf1efa27607
This commit is contained in:
parent
804d59c542
commit
144e74682b
49 changed files with 189 additions and 126 deletions
|
|
@ -3,8 +3,6 @@ class EatersFoodstuff < ActiveRecord::Base
|
|||
belongs_to :foodstuff, :class_name => "Petfood", :foreign_key => "foodstuff_id"
|
||||
belongs_to :eater, :polymorphic => true
|
||||
|
||||
def before_save
|
||||
self.some_attribute = 3
|
||||
end
|
||||
before_save { |record| record.some_attribute = 3 }
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue