Skip to content

Instantly share code, notes, and snippets.

@mytrile
Created August 3, 2008 09:12
Show Gist options
  • Save mytrile/3815 to your computer and use it in GitHub Desktop.
Save mytrile/3815 to your computer and use it in GitHub Desktop.
class Question < ActiveRecord::Base
has_one :answer
has_many :suggestions
def s_attributes=(s_attributes)
s_attributes.each do |attr|
suggestions.build(attr)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment