I'm using basic scaffold structure. What I need, is to add 'moderate'
action and view by changing published to true. In my idea, on
moderate.html I should get the list of all unpublished entries with the
ability to change and save their parameters. Here are parts of my code:

 #names_controller.rb
 def moderate
 @name = Name.find(:all, :conditions => {:published => false} )
   respond_to do |format|
      format.html
      format.xml
     end
 end

#moderate.html.erb
<% form_for @name.each do |f| %>
  <%= f.error_messages %>
    <%= f.text_field :which %>
    <%= f.text_field :what %>
    <%= f.check_box :published %>
    <%= f.submit %>
  </p>
<% end %>
Instead I'm getting this error:

NoMethodError in Names#moderate

Showing app/views/names/moderate.html.erb where line #1 raised:

undefined method `enumerable_enumerator_path' for
#<ActionView::Base:0x1042c3e90>
Extracted source (around line #1)
So, can you help to newbie please?

ruby 1.8.7 (2009-06-12 patchlevel 174)

[universal-darwin10.0] Rails 2.3.5

-- 
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