Hi,
I am having some issue with the path while running the stories. Below is
my controller code.
class ShopController < ApplicationController
def add_to_cart
# My code here...
end
end
in routes i have the following,
with_options :controller => "shop", :action =>
"index", :requirements =>
{ :method => :get } do |shop|
shop.add_to_cart "shops/:shop_id/add_to_cart/:product_id",
:action => ''add_to_cart''
end
When I run my application I get everything working correctly.
"add_to_cart_path(@shop, @product)" returns
"/shop/add_to_cart/1"
while running the application.
But when I run the same in my stories, I am getting an error with the
path. The path just returns "/add_to_cart/1". I don''t know
why it is not
running correctly in the stories.
Any suggestions are appreciated.
Thanks in advance...
--
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-/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
-~----------~----~----~----~------~----~------~--~---