disruptive tech wrote:
> I have a series of countries listed in a table in the following form:
> 
> id, country_name
> 
> I want to pull these in and I'm trying everything under the sun from a
> variety of different peoples pages. I just cannot get anything working
> at all. I have tried pulling all the records in the the ctrl.rb file
> with:
> 
> @country_list = Country.find_all
> 
> I get the following:
> 
> undefined method `find_all' for #<Class:0xb657a3a8>
> 
> I have put this in the following method
> 
> def new
>     @usr = Usr.new
>     @country_list = Country.find_all
>     respond_to do |format|
>       format.html # new.html.erb
>       format.xml  { render :xml => @usr }
>     end
>   end
> 
> 
> I'm not fussy about the methodology, I simply want a drop down list the
> easiest and simplest way...I have tried a number of other approaching,
> but I wonder if there are problems with RoR versions?
> 
> Thanks in advance.

I also tried directly in the view:

collection_select 'country', 'type', Type.find(:all), :type_name, :id

with nothing in the controller.

-- 
Posted via http://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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to