Forum: Ruby on Rails country_select in Rails 2.3.2

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Tam K. (Guest)
on 2009-03-28 20:52
Hello,

I have this code for country_select

<%= country_select :user, :country, nil, {:include_blank=> true},
{:class=>"topicField"} %>

Used to work for Rails 2.0.2 but as I'm trying to upgrade to Rails 2.3.2
I'm getting the following error:

undefined method `country_select' for #<ActionView::Base:0x24779b0>

any ideas?

Thanks,

Tam
Tam K. (Guest)
on 2009-03-28 22:47
I figured it out: country_select is deprecated but you can still use it
as:

<%#= country_select :user, :country, nil, {:include_blank=> true},
{:class=>"topicField"} %>

But its definitely better some plugin instead of using deprecated method
Colin L. (Guest)
on 2009-03-28 23:01
(Received via mailing list)
2009/3/28 Tam K. <removed_email_address@domain.invalid>

>
> I figured it out: country_select is deprecated but you can still use it
> as:
>
> <%#= country_select :user, :country, nil, {:include_blank=> true},
> {:class=>"topicField"} %>


Haven't you just commented it out with <%#  ?
Frederick C. (Guest)
on 2009-03-28 23:18
(Received via mailing list)
On Mar 28, 9:00 pm, Colin L. <removed_email_address@domain.invalid> wrote:
> Haven't you just commented it out with <%#  ?
Yup. country select was extracted into a plugin:
http://github.com/rails/country_select/tree/master

Fred
Miguel R. (Guest)
on 2009-03-29 15:19
(Received via mailing list)
Also seams to me he just commented it. Or is that (#=) some strange
magic? lolol
This topic is locked and can not be replied to.