On Jueves, 15 de Septiembre de 2011 19:10:26 Jim escribió:
> I have a parent model Design, which has many Options (polymorphic
> because other models like Job also have options).  The option name and
> value fields display on the create/edit forms, and the values can be
> saved correctly.  However, I'd like to use a helper method to display
> a select for option name, and change option_value to be a text_field
> instead of textarea.  I have done this before in a Rails 2.2.x
> project, but the naming and loading for helpers is different.
> 
> I have helper overrides for the base models implemented where
> necessary, using the
> 
> <model>_<attribute>_form_column

It should work with 3.0.23. You can try with attribute_form_column too.

> 
> method naming.  However, I cannot come up with any working combination
> for my has_many table.  The base has_many model does not have it's own
> controller or helper files.  Should I create one anyway? If so, how
> should it be named, considering that in Design the has_many is
> specified as such:
> 
> has_many :design_options, :class_name => 'JobOption', :as
> => :optionable
> 
> Would I have to create a design_options controller even though a
> DesignOption model doesn't exist? If I create a job_options controller/
> helper, would the helper methods be picked up properly?  Also, note
> that I have no need for a nested options list display, merely the form
> override for the edit form.

You shouldn't need it if it's working without helper overrides

> 
> Thanks in advance for any ideas.
> 
> Jim

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

-- 
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.

Reply via email to