Finally fixed it!
Needed to add the form_for wrapper.
here is the new code.
<% form_for :album, :url => { :action => :create } do |form| %>
<%= @album_list = Album.find(:all, :order => "album_name")
form.select(:id, @album_list) %>
<% end %>
RailsNewby wrote:> I am new to rails, PHP background. I''m completely lost on this. I
am
> trying to pull all of the albums from the albums table into a select
> box. But every time I run the script I get the "wrong number of
> arguments (0 for 1)" error. I''ve looked on other message
boards and
> searched the web but I can''t seem to find the answer.
I''ve tried several
> different variations of the form.select but they all lead to the same
> error.
>
> Oh, and I am using Instant Rails and this is a new application to this
> install.
>
> Here is the error:
>
> ArgumentError in Admin#index
>
> Showing app/views/admin/index.rhtml where line #3 raised:
>
> wrong number of arguments (0 for 1)
>
> Extracted source (around line #3):
>
> 1: <form method="POST">
> 2: <%= @album_list = Album.find(:all, :order =>
"album_name")
> 3: form.select(:album_name, @album_list)
> 4: %>
> 5: </form>
>
> Any help would be greatly appreciated
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---