On Jueves, 21 de Enero de 2010 21:43:47 Mat escribió:
> What I'd like to be able to do is say something like:
>
>     columns[:status].form_ui = :select
>     columns[:status].options = {:options
> => :status_value_list, :html_options => {}}
>
> and then in my model:
>
>     def status_value_list
>         aasm_events_for_current_state.map { |e| [e.name,
> e.name.to_s.humanize] } }
>     end
>
> Before I go and patch AS to provide this, does anyone know if this
> already exists? Or if there's a better way to skin this cat?
>
> Thanks in advance.

That option doesn't exist, but you can use inplace_edit with a form override. 
If your form override doesn't return the same UI for each record, you can set 
inplace_edit to use :ajax method, which will use an ajax request to render the 
field each time you try to edit the field. It's documented in API column
http://wiki.github.com/activescaffold/active_scaffold/api-column


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