mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
e0750d6a5c
Allows nested Hashes (i.e. from nested forms) to hydrate the appropriate ActiveRecord models. class Post < ActiveRecord::Base belongs_to :author, :accessible => true has_many :comments, :accessible => true end post = Post.create({ :title => 'Accessible Attributes', :author => { :name => 'David Dollar' }, :comments => [ { :body => 'First Post!' }, { :body => 'Nested Hashes are great!' } ] }) post.comments << { :body => 'Another Comment' } Signed-off-by: Pratik Naik <pratiknaik@gmail.com> |
||
---|---|---|
.. | ||
assets | ||
cases | ||
connections | ||
fixtures | ||
migrations | ||
models | ||
schema | ||
config.rb |