Data doesn't show in dropdown

The usage of

<%= select 'activity', 'value', 'Choose an Activity' %></p>

is incorrect. The proper usage would be something like:

  <%= select('activity', 'value', {'Choose an Activity', 0}.merge(Activity.find(:all).collect {|a| [ a.value, a.id ] })) %>

However, this is dangerous having the "Choose an Activity" in there. I recommend simply using a blank, like so:

  <%= select('activity', 'value', Activity.find(:all).collect {|a| [ a.value, a.id ] }, {:include_blank => true}) %>

Hope this helps.

It's dangerous simply because it requires you to add checks to make sure that the directional option wasn't selected and to properly respond to that error. There's no technical danger, just the danger of us programmers screwing up (which happens more often than not).

There's a possibility that Rails automatically handles this error. If it does, then you're free to use it, from a danger aspect. However, a usability study that I once read shows that users will fail/forget to input data into fields that are preloaded (I believe the study I am recalling was done in a compiled GUI application, but I expect that the same issues apply to Web usability)

Here's the link to the Ruby on Rails API docs (Note, this is the current version 2.0.2 -- if you haven't upgraded, I suggest you do so):

     http://api.rubyonrails.com

And, the Ruby API docs:

    Index of Files, Classes & Methods in Ruby 3.1.2 (Ruby 3.1.2)

And a ton of great Ruby programming docs:

    http://www.ruby-doc.org/

And I believe the 2 APIs are also put onto your computer under the gem docs and the ruby docs respectively during install.