Displaying 3 results from an estimated 3 matches for "nested_attributes_for".
2012 Feb 23
1
Bug in nested_attributes_for: question about best way to patch
I''ve discovered what I''m pretty confident is unexpected behavior in
accepts_nested_attributes_for, and am developing a patch, but I''ve
encountered a question about how the core team would prefer the
implementation to look.
Here''s the bug: when assigning to a belongs_to relationship (and I
believe one-to-one, but I haven''t verified yet) if you mark the
association for...
2012 Jan 20
3
Fields_for adding html (text) for hidden field
...type=''hidden'' />'' text
printed out in my form. See attached image. I''ve spent too much time
trying to figure it out already and it''s not going to stop me from
moving on for now.
As you can see it''s still very early on.
I''m using nested_attributes_for and fields_for: (also HAML)
=============================================================
= form_for @user, :url => {:action => ''update''} do |f|
# removed fields here
= f.fields_for :roles do |r|
- unless r.object.for_object.nil?
= r.label :role, r.object.for_...
2013 Feb 27
0
Exended modules and reject_if in nested_attributes
I have some common class methods in a module ''active_record_additions''
that I load into a class by Activity by using extend ActiveRecordAdditions
The Activity class uses nested_attributes_for with a reject_if method saved
in the module ''active_record_additions''
The problem is that the class methods in ''active_record_additions'' works
when I use them as ordinary class methods, but not as a a method in
reject_if.
I got the message NameError (undefine...