Country_select in Rails 2.3.2


#1

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


#2

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


#3

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 <%# ?


#4

Also seams to me he just commented it. Or is that (#=) some strange
magic? lolol


#5

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