Displaying 1 result from an estimated 1 matches for "gallery_page_path".
2012 Jul 18
0
Rails 3.1 Optional Routes
...routes like below
match ''Gallery(/:gallery_id(/:image_id))(/page/:g_page)'' => "wps/
gallery#show_gallery_page",:as => :gallery_page
in console i am trying to call the routes like below
include Rails.application.routes.url_helpers
=> Object
1.9.3dev :002 > gallery_page_path
=> "/Gallery"
1.9.3dev :003 > gallery_page_path(:gallery_id => 3)
=> "/Gallery/3"
1.9.3dev :004 > gallery_page_path(:image_id => 6)
=> "/Gallery?image_id=6"
1.9.3dev :005 >
if i pass gallery_id means it is giving expected result,but i pass
i...