search for: vendors_path

Displaying 2 results from an estimated 2 matches for "vendors_path".

2009 Jan 18
2
InvalidAuthenticityToken error with remote_form_for
...%></td> <td><%= vendor.location %></td> </tr> -- controller : def create @vendor = Vendor.new(params[:vendor]) if @vendor.save respond_to do |format| flash[:notice] = "New vendor #{@vendor.name} was saved!" format.html { redirect_to vendors_path } format.js end end end -- rjs : page.replace_html ''flasher'', flash[:notice] unless flash[:notice].blank? page.insert_html :after, ''vendors_title'', :partial => ''vendor'', :object => Vendor.fin...
2010 Apr 14
35
Conditionally adding a link to a form -- how?
I''ve got two entities created by scaffolding: Expense & Vendor In Expense#new there''s a form with a Vendors-drop-down and a NewVendor- button. The latter button brings up Vendor#new. The Create button in Vendor#new brings up Vendor#show with Edit & Back links. I want to append a third link conditionally to Vendor#show: if the Expense#new form led to the Vendor#show