Wednesday, June 9, 2010

[Rails] Re: Select question?

On Jun 8, 6:18 pm, Lamer Lamer <li...@ruby-forum.com> wrote:
> view
> <%= select( :order, :hcins, { "Man" => 3, "Is" => 5}) %>
> (hcins is string value)
>

[...]
> when I submit the form "hcins" gets "3 or 5" but I like to get text of
> selection("man" or "is") for "hcins" and values for "ucret" calculation.
>

If you need both the text and the numerical value then you need to
store in your app the mapping of values to labels.

Fred

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate