I have a @people instance variable that is the return from Person.find(:all) I then want to have a revise.html that allows me to fill out one textfield with a number that I can then @people.update_all(:revision) I try to do this:REVISION CHANGE <% form_for @people do |f| %> <%= f.error_messages %> <p> <%= f.label :version %><br /> <%= f.text_field :version %> </p> <p> <%= f.submit "Update" %> </p> <% end %> and it blows up on me with: undefined method `person_person_person_person_person_person_person_person_path'' for #<ActionView::Base:0x101688c90> Extracted source (around line #3): 1: REVISION CHANGE 2: 3: <% form_for @people do |f| %> 4: <%= f.error_messages %> 5: <p> 6: <%= f.label :version %><br /> Sorry Im confused by this helper and how it is trying to make the form. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
theprojectabot wrote:> I have a @people instance variable that is the return from > Person.find(:all) > > I then want to have a revise.html that allows me to fill out one > textfield with a number that I can then @people.update_all(:revision) > > I try to do this:REVISION CHANGE > > <% form_for @people do |f| %>Try to use form_tag instead of form_for <% form_tag ''youraction'', :method=>''yourmethod'' %>> <%= f.error_messages %> > <p> > <%= f.label :version %><br /> > <%= f.text_field :version %> > </p> > > <p> > <%= f.submit "Update" %> > </p>and label_tag, text_field_tag, submit_tag helpers, as well> <% end %>-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You also may read http://guides.rubyonrails.org/form_helpers.html fbout rails form helpers -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.