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.
330edb8dc8bbc5a824984cf46e941b2f?d=identicon&s=25 Tam Kbe (tkbeili)
on 2009-03-28 19: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
330edb8dc8bbc5a824984cf46e941b2f?d=identicon&s=25 Tam Kbe (tkbeili)
on 2009-03-28 21: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
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2009-03-28 22:01
(Received via mailing list)
2009/3/28 Tam Kbe <rails-mailing-list@andreas-s.net>

>
> 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 <%#  ?
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-03-28 22:18
(Received via mailing list)
On Mar 28, 9:00 pm, Colin Law <clan...@googlemail.com> 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
80583db5af674ca20393f42a20101129?d=identicon&s=25 Miguel Regedor (Guest)
on 2009-03-29 13: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.