On Viernes, 25 de Septiembre de 2009 23:48:11 erhard escribió:
> Hi,
>
> I have sam values which should be displayed in a dropdown. The user
> choose one and when saved the index (or the value itself) should be
> stored.
>
> So I created a partial form view which works but the value (in my case
> 1 2 or 3 has not been saved at all.
>
> Here my partial content
>
> <%= select_tag "priority", options_for_select('low' => '1', 'high' =>
> '2')%>

Your helpers must create inputs with same name as ActiveScaffold uses. You get 
that name as second parameter. Also you can use form_ui select instead of a 
helper if you want:
config.columns[:priority].form_ui = :select
config.columns[:priority].options = {:options => [['low', 1], ['high', 2]]}

>
> And here the controller :
>
>   before_filter(:get_project)
>   active_scaffold :stories do |config|
>     config.label = "Stories"
>     config.columns =
> [:name, :priority, :description, :effort, :loss, :gain]
>     list.sorting = {:priority => 'ASC'}
>   end
>
>
>
>
> Thanks
> Erhard
>
> 
-- 
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