On Martes, 2 de Noviembre de 2010 14:54:45 Dan escribió:
> hello
> 
> I would appreciate some help with the issue below.
> 
> I have in a model a hash with array values, like this
> 
> class User < ActiveRecord::Base
> 
>   LIST = { "Dan" => ["333","abc"] ,
>            "John" => ["777","qwery"] ,
>         }
> end
> 
> class UserController < ApplicationController
>   active_scaffold :user do |config|
>     config.label = "Test"
>     config.columns = [:name, :value]
>     config.columns[:name].form_ui = :select
>     config.columns[:name].options = {:options => User::LIST.map}
>     config.columns[:name].update_column = :value
>     config.columns[:value].form_ui = :select
>   end
> end
> 
> I what that on selection of a name from the User::LIST on :value field
> to be presented with the options from the array
> how can I do that?

You can't use :select form_ui in this case, you will have to make a form 
override for value column

>  I searched all the docs but only possible solution is to use Custom
> Association Options, but this means the values should be stored in the
> database
> 
> thank you

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