Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Recipe < ActiveRecord::Base
- has_many :instructions, autosave: true, class_name: 'RecipeInstruction'
- end
- class Recipe < ActiveRecord::Base
- has_many :instructions, -> { order('position ASC') }, autosave: true, class_name: 'RecipeInstruction'
- end
- has_many :instructions, -> { order('position ASC') }, autosave: true, class_name: 'RecipeInstruction' do
- def << *args
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement