David Dollar
-
Add :accessible option to Associations for allowing mass assignments using hash. [#474 state:resolved]
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
endpost = 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
e0750d6a5c7f621e4ca12205137c0b135cab444a
-
Fixes a subtle bug when using symbols for key definitions in habtm associations
6c1c16bfd9eb865dffa68c12c7df66d5a59a8714

