Collection_select doesn't populate the drop down list

I’m having an issue using collection_select to create a drop down menu.
All the guides say that this

<%= collection_select(:page, :user_id, @users, :id, :full_name,
:include_blank => false) %>

should work but when I run the server, instead of a list of users
appearing it’s just a blank list. The associations are that page belongs
a user and a user has many pages, and there are users in the database
that should be obtained in the controller when I call @users = User.all

Any idea on how to get the drop down list to populate?

This is the html code that is generated so something is missing/wrong
but I’m not sure what it is.

On Fri, Sep 28, 2012 at 7:49 AM, Ke En [email protected] wrote:

<%= collection_select(:page, :user_id, @users, :id, :full_name,
:include_blank => false) %>

This is the html code that is generated

Do those numbers look like valid user_id values? If so, are you sure
your User model has a full_name method?

Hassan S. ------------------------ [email protected]
twitter: @hassan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs