I just started working with Rails 2.2.2 and I don''t seem to be having much luck with the new routing scheme. When I try to edit a record and save it I get and error message that looks as though it is trying to use the id for the action. So just what am I doing wrong? No action responded to 8. Actions: check_authorization, create, destroy, edit, index, logged_in?, make_profile_vars, nav_link, new, paginate, paginated?, param_posted?, protect, show, text_field_for, and update --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Show us your action. On Feb 16, 7:03 pm, bearblu <r...-nJe+0kHbNGlBDgjK7y7TUQ@public.gmane.org> wrote:> I just started working with Rails 2.2.2 and I don''t seem to be having > much luck with the new routing scheme. When I try to edit a record > and save it I get and error message that looks as though it is trying > to use the id for the action. So just what am I doing wrong? > > No action responded to 8. Actions: check_authorization, create, > destroy, edit, index, logged_in?, make_profile_vars, nav_link, new, > paginate, paginated?, param_posted?, protect, show, text_field_for, > and update--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The edit action is: def edit @title = "Pinnacle Harvest: Edit Vendor" @vendor = Vendor.find(params[:id]) end the update action is: def update raise params.inspect @vendor = Vendor.find(params[:id]) respond_to do |format| if @vendor.update_attributes(params[:vendor]) flash[:notice] = ''Vendor was successfully updated.'' format.html { redirect_to :action => ''index'' } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @vendor.errors, :status => :unprocessable_entity } end end end the edit.html.erb file is: <% form_for :vendor do |form| %> <fieldset> <legend><%= @title %></legend> <%= error_messages_for ''vendor'' %> <%= text_field_for form, "name" %> <%= text_field_for form, "city" %> <%= text_field_for form, "state" %> <%= text_field_for form, "zip_code", ZIP_CODE_LENGTH %> <%= text_field_for form, "phone_number" %> <%= text_field_for form, "fax_number" %> <%= text_field_for form, "web_url" %> <%= submit_tag "Update", :class => "new_client_vendor_submit" %> </fieldset> <% end %> There is nothing fancy, I am pretty much a novice at Rails. ;-) Rick On Feb 16, 4:05 pm, jemminger <jemmin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Show us your action. > > On Feb 16, 7:03 pm, bearblu <r...-nJe+0kHbNGlBDgjK7y7TUQ@public.gmane.org> wrote: > > > I just started working with Rails 2.2.2 and I don''t seem to be having > > much luck with the new routing scheme. When I try to edit a record > > and save it I get and error message that looks as though it is trying > > to use the id for the action. So just what am I doing wrong? > > > No action responded to 8. Actions: check_authorization, create, > > destroy, edit, index, logged_in?, make_profile_vars, nav_link, new, > > paginate, paginated?, param_posted?, protect, show, text_field_for, > > and update--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
That''s a rather strange error considering you''re not even trying to redirect to :show after an update, but rather just :index. Further strange are the actions it says are valid: check_authorization, create, destroy, edit, index, logged_in?, make_profile_vars, nav_link, new, paginate, paginated?, param_posted?, protect, show, text_field_for, and update What is the URL that results in this error? Do you have some other plugins that might be adding these other actions? On Feb 16, 7:14 pm, bearblu <r...-nJe+0kHbNGlBDgjK7y7TUQ@public.gmane.org> wrote:> The edit action is: > > def edit > @title = "Pinnacle Harvest: Edit Vendor" > @vendor = Vendor.find(params[:id]) > end > > the update action is: > > def update > raise params.inspect > @vendor = Vendor.find(params[:id]) > > respond_to do |format| > if @vendor.update_attributes(params[:vendor]) > flash[:notice] = ''Vendor was successfully updated.'' > format.html { redirect_to :action => ''index'' } > format.xml { head :ok } > else > format.html { render :action => "edit" } > format.xml { render :xml => @vendor.errors, :status > => :unprocessable_entity } > end > end > end > > the edit.html.erb file is: > <% form_for :vendor do |form| %> > <fieldset> > <legend><%= @title %></legend> > > <%= error_messages_for ''vendor'' %> > <%= text_field_for form, "name" %> > <%= text_field_for form, "city" %> > <%= text_field_for form, "state" %> > <%= text_field_for form, "zip_code", ZIP_CODE_LENGTH %> > <%= text_field_for form, "phone_number" %> > <%= text_field_for form, "fax_number" %> > <%= text_field_for form, "web_url" %> > > <%= submit_tag "Update", :class => "new_client_vendor_submit" %> > </fieldset> > <% end %> > > There is nothing fancy, I am pretty much a novice at Rails. ;-) > > Rick > > On Feb 16, 4:05 pm, jemminger <jemmin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Show us your action. > > > On Feb 16, 7:03 pm, bearblu <r...-nJe+0kHbNGlBDgjK7y7TUQ@public.gmane.org> wrote: > > > > I just started working with Rails 2.2.2 and I don''t seem to be having > > > much luck with the new routing scheme. When I try to edit a record > > > and save it I get and error message that looks as though it is trying > > > to use the id for the action. So just what am I doing wrong? > > > > No action responded to 8. Actions: check_authorization, create, > > > destroy, edit, index, logged_in?, make_profile_vars, nav_link, new, > > > paginate, paginated?, param_posted?, protect, show, text_field_for, > > > and update--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
There are no plugins, I do have several gems installed... but you just got me to thinking. Yep, it looks as though my code base got corrupted. Thanks, Rick On Feb 16, 5:52 pm, jemminger <jemmin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> That''s a rather strange error considering you''re not even trying to > redirect to :show after an update, but rather just :index. > > Further strange are the actions it says are valid: > check_authorization, create, > destroy, edit, index, logged_in?, make_profile_vars, nav_link, new, > paginate, paginated?, param_posted?, protect, show, text_field_for, > and update > > What is the URL that results in this error? Do you have some other > plugins that might be adding these other actions? > > On Feb 16, 7:14 pm, bearblu <r...-nJe+0kHbNGlBDgjK7y7TUQ@public.gmane.org> wrote: > > > The edit action is: > > > def edit > > @title = "Pinnacle Harvest: Edit Vendor" > > @vendor = Vendor.find(params[:id]) > > end > > > the update action is: > > > def update > > raise params.inspect > > @vendor = Vendor.find(params[:id]) > > > respond_to do |format| > > if @vendor.update_attributes(params[:vendor]) > > flash[:notice] = ''Vendor was successfully updated.'' > > format.html { redirect_to :action => ''index'' } > > format.xml { head :ok } > > else > > format.html { render :action => "edit" } > > format.xml { render :xml => @vendor.errors, :status > > => :unprocessable_entity } > > end > > end > > end > > > the edit.html.erb file is: > > <% form_for :vendor do |form| %> > > <fieldset> > > <legend><%= @title %></legend> > > > <%= error_messages_for ''vendor'' %> > > <%= text_field_for form, "name" %> > > <%= text_field_for form, "city" %> > > <%= text_field_for form, "state" %> > > <%= text_field_for form, "zip_code", ZIP_CODE_LENGTH %> > > <%= text_field_for form, "phone_number" %> > > <%= text_field_for form, "fax_number" %> > > <%= text_field_for form, "web_url" %> > > > <%= submit_tag "Update", :class => "new_client_vendor_submit" %> > > </fieldset> > > <% end %> > > > There is nothing fancy, I am pretty much a novice at Rails. ;-) > > > Rick > > > On Feb 16, 4:05 pm, jemminger <jemmin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Show us your action. > > > > On Feb 16, 7:03 pm, bearblu <r...-nJe+0kHbNGlBDgjK7y7TUQ@public.gmane.org> wrote: > > > > > I just started working with Rails 2.2.2 and I don''t seem to be having > > > > much luck with the new routing scheme. When I try to edit a record > > > > and save it I get and error message that looks as though it is trying > > > > to use the id for the action. So just what am I doing wrong? > > > > > No action responded to 8. Actions: check_authorization, create, > > > > destroy, edit, index, logged_in?, make_profile_vars, nav_link, new, > > > > paginate, paginated?, param_posted?, protect, show, text_field_for, > > > > and update--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You need to show your routes.rb file as well. This is the file that routes requests to controllers and actions within them. Bharat --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---