开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜