This doesn't work if you have nested models...Stupid example:
A belongs_to B
B has_many A
If you have two fields with same column_name, the helper will not work...
You can "workaround" it using this check:
def name_form_column record, input_name
if record.class == A
# for A model
else
# for B model
end
end
If you have 3 models, you can use elsif to check also...
I cant found another method to fix it
Regards
Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
escreveu:
> El Thursday 04 December 2008 10:52:45 mi escribió:
>
>> I upgrade active scaffold for work with rails 2.2.2.
>>
>> I have the same 'column_name' for different controllers.
>>
>> One of this has a helper with #{column_name}_column defined.
>>
>> I noticed that this method is used for all the field with the same
>> 'column_name' .
>>
>> Anyone know how is possible to avoid that?
>>
>>
>
> Remove helper :all from application controller
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---