search for: new_product_url

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

2007 Feb 11
1
Specing Rails Views
Hello - I''m currently trying to write some specs for my rails views. My views depend upon the restful authentication plugin method logged_in? Like so, <% if logged_in? %> <ul id="product-admin-nav"> <dd><%= link_to "create a new product", new_product_url %></dd> </ul> <% end %> However, when I have the following in my specification: render "products/show" I get an error ''logged_in?'' isn''t defined for <#Class....> My rails app gets ''logged_in?'' via ''in...
2013 Dec 12
2
JS response -pls help somebody
Hi all, Pls help to find a solution : i have a form like following <%= form_for @product , :url => products_url(:format => ''js''), :html =>{:id=>"create_product_form" ,:multipart => true,:remote=>true} do |f| %> what i have to do is like when submiting form i have to redirect to new page else want to execute js like following def create if