Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. class Recipe < ActiveRecord::Base
  2. has_many :instructions, autosave: true, class_name: 'RecipeInstruction'
  3. end
  4.  
  5. class Recipe < ActiveRecord::Base
  6. has_many :instructions, -> { order('position ASC') }, autosave: true, class_name: 'RecipeInstruction'
  7. end
  8.  
  9. has_many :instructions, -> { order('position ASC') }, autosave: true, class_name: 'RecipeInstruction' do
  10. def << *args
  11. end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement