I have just upgraded my entire system to use the subject line version of rails...of course...this broke my previous rails apps as many things are handled a bit differently...! I have all apps running fine now but am having a problem when using form_tag over form_for...(I need form_tag so I can use ''select'' drop- downs and can find no such usage for form-for)... Here''s the error I get: Unknown action No action responded to 8. Actions: create, destroy, edit, index, new, show, and update Here''s the form code: <% form_tag :action => ''update'', :id => @tankticket do %> <%= render :partial => ''form'' %> <%= submit_tag ''Update'' %> <% end %> Here''s the update code: def update @tankticket = Tankticket.find(params[:id]) respond_to do |format| if @tankticket.update_attributes(params[:tankticket]) format.html { redirect_to(@tankticket, :notice => ''Tankticket was successfully updated.'') } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @tankticket.errors, :status => :unprocessable_entity } end end end It''s gotta be something simple that I''m missing...and...I''m thinking it''s in the ''form_tag'' code...dunno -- 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.
On 3 August 2010 23:04, crashbangboom <crashbangboom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have just upgraded my entire system to use the subject line version > of rails...of course...this broke my previous rails apps as many > things are handled a bit differently...! > > I have all apps running fine now but am having a problem when using > form_tag over form_for...(I need form_tag so I can use ''select'' drop- > downs and can find no such usage for form-for)...Just use f.select> > Here''s the error I get: > Unknown action > No action responded to 8. Actions: create, destroy, edit, index, new, > show, and updateWhen does that happen? Check in the log to see what is happening. Show us some more of the log if you cannot see it, from the render of the view you have shown below to the end. Colin> > Here''s the form code: > <% form_tag :action => ''update'', :id => @tankticket do %> > <%= render :partial => ''form'' %> > <%= submit_tag ''Update'' %> > <% end %> > > Here''s the update code: > def update > @tankticket = Tankticket.find(params[:id]) > > respond_to do |format| > if @tankticket.update_attributes(params[:tankticket]) > format.html { redirect_to(@tankticket, :notice => ''Tankticket > was successfully updated.'') } > format.xml { head :ok } > else > format.html { render :action => "edit" } > format.xml { render :xml => @tankticket.errors, :status > => :unprocessable_entity } > end > end > end > > It''s gotta be something simple that I''m missing...and...I''m thinking > it''s in the ''form_tag'' code...dunno-- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks Colin... The Unkown Action error in my original post is all the error I get...sorry f.select is not an option in ''form_for''...I tried that...! On Aug 4, 1:59 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 3 August 2010 23:04, crashbangboom <crashbangb...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I have just upgraded my entire system to use the subject line version > > of rails...of course...this broke my previous rails apps as many > > things are handled a bit differently...! > > > I have all apps running fine now but am having a problem when using > > form_tag over form_for...(I need form_tag so I can use ''select'' drop- > > downs and can find no such usage for form-for)... > > Just use f.select > > > > > Here''s the error I get: > > Unknown action > > No action responded to 8. Actions: create, destroy, edit, index, new, > > show, and update > > When does that happen? > Check in the log to see what is happening. Show us some more of the > log if you cannot see it, from the render of the view you have shown > below to the end. > > Colin > > > > > Here''s the form code: > > <% form_tag :action => ''update'', :id => @tankticket do %> > > <%= render :partial => ''form'' %> > > <%= submit_tag ''Update'' %> > > <% end %> > > > Here''s the update code: > > def update > > @tankticket = Tankticket.find(params[:id]) > > > respond_to do |format| > > if @tankticket.update_attributes(params[:tankticket]) > > format.html { redirect_to(@tankticket, :notice => ''Tankticket > > was successfully updated.'') } > > format.xml { head :ok } > > else > > format.html { render :action => "edit" } > > format.xml { render :xml => @tankticket.errors, :status > > => :unprocessable_entity } > > end > > end > > end > > > It''s gotta be something simple that I''m missing...and...I''m thinking > > it''s in the ''form_tag'' code...dunno-- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
crashbangboom wrote: [...]> f.select is not an option in ''form_for''...I tried that...!Sure it is. If you''re getting errors, fix the errors. If you can''t do that, share them with the list. But f.select should absolutely work. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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.