ruby on rails 3 - Using link_to with routes -
my route:
scope "/ajax" resources :companies resources :comments end end
so, link_to company.title, company
generates such url: /ajax/companies/1
how generate clear url without first /ajax/
part? result want generate companies/(:id) , companies/create , companies/edit/(:id)
the obvious answer remove scope '/ajax' do
line, have feeling not looking for. maybe put resources line in there again outside of scope block.
is ajax module? if so, replace scope :module => 'ajax' do
.
Comments
Post a Comment