我使用 rails v 2.3.14
我添加路线routes.rb
map.with_options :controller => 'consumer_profile' do |m|
...
m.consumer_profile_show_coupons 'consumer/:id/coupons', :action => 'show_coupons', :requirements => {:id => /c-[0-9a-zA-Z]+/}
...
end
我添加defconsumer_profile_controller.rb
def show_coupons
..
end
我添加文件consumer_profile/show_coupons.html.erb
rake 路由:
consumer_profile_show_coupons /consumer/:id/coupons {:action=>"show_coupons", :controller=>"consumer_profile"}
但是当我使用seo_consumer_profile_coupons_url(current_user.consumer_profile)
那个导轨时说:
undefined method `seo_consumer_profile_coupons_url'
有什么想法吗?