1
#routes.rb

resources :users ,  :constraints => { :id => /[^\/]+/ }

namespace :admin do
  resources :users ,  :constraints => { :id => /[^\/]+/ }
end

when I call a route /users/abc.efg it works

but for /admin/users/abc.efg it does not

Lib Versions:

activeadmin (0.5.0)

rails 3.2

Pritesh Jain
  • 9,106
  • 4
  • 37
  • 51
  • Outside of activeadmin you can do it by changing the id constraints (http://stackoverflow.com/a/5369702/776723); some activeadmin routes can be modified manually (http://stackoverflow.com/questions/12371161/custom-route-for-activeadmin-actions), but I haven't figured out how to manually change the id constraints. – ShadSterling May 09 '16 at 18:14
  • In my case it turned out that all I needed to do was put my constrained routes before `ActiveAdmin.routes(self)`. My routes are written a bit differently than yours, so I'm not sure the same will apply. See http://stackoverflow.com/questions/37125713 – ShadSterling May 20 '16 at 18:37

1 Answers1

-1

I urge you to abandon the idea of using dot on url. Often the part after dot is regarded as :format in route, you may fight with the convention all the day.

Billy Chan
  • 24,625
  • 4
  • 52
  • 68