On Jun 23, 7:10 am, Newb Newb <rails-mailing-l...@andreas-s.net>
wrote:
> Hi...
> i used paulca-phone_codes plugin for country code.and it works.
> <%= f.select :country_code, PhoneCode.options_for_select(:prefix)%>
> what i want to know is how to apply css class for this.when i tried like
> below it doesnot work
> <%= f.select :country_code, PhoneCode.options_for_select(:prefix),
> {:class => "mystyle" }%>
>

Because select takes two hashes of options. The first is for options
for select itself, the second is for html options. You're sticking
your html options in the first hash.

Fred
> Any helps
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to