Restrict routes by environment
We (me and all my personalities, of course) have several routes we'd like to not expose in production but we use in development and testing. I开发者_C百科 know you can (or could?) add a before filter in the controller to lock down these things depending upon environment, but can this be done from config/routes.rb?
thanks
Have you tried:
if Rails.env.development?
resources :secrets
end
As I understand the router, that should work.
精彩评论