On Martes, 9 de Marzo de 2010 12:06:52 Swartz escribió:
> On Mar 8, 4:26 am, "Sergio Cambra .:: entreCables S.L. ::."
>
> <[email protected]> wrote:
> > You must set the onchange using javascript_for_update_column helper in
> > your helper override. In a later version you will get full options hash
> > in your helper override instead of only a name and you won't need to call
> > the helper by yourself.
> >
> > Also, you can use form_ui select:
> > config.columns[:sponsorship_type].form_ui = :select
> > config.columns[:sponsorship_type].options = {:update_column
> > => :sponsorship_id, :options => [[text1, value1], [text2, value2]]}
>
> Sorry, Sergio, can you clarify what you had said.
>
> Is the functionally to send the options hash with select values in the
> current version or is it going to be in the later version of AS?
> I'm talking about this from your example:
> config.columns[:sponsorship_type].options = {:update_column
>
> > => :sponsorship_id, :options => [[text1, value1], [text2, value2]]}
This is current version, it's an old feature.
Feature for later version is pass options hash to form overrides. Now form
overrides have this signature:
def column_form_column(record, input_name)
Later they will have this one:
def column_form_column(record, options)
And options will be {:name => 'input_name', :id => 'input_id', :onchange =>
'javascript_code_to_update_form_field', ...}
So, it will be easy to use form overrides and update_column option.
>
> Thanks again!
--
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.