开发者

RoR: Where is the "rails/info/properties" route defined?

开发者 https://www.devze.com 2023-01-03 03:16 出处:网络
I\'m running Rails 2.3.4. When I create a new rails project, the public/index.html file has a link named \"About your appli开发者_StackOverflow社区cation\'s environment\" that points to \"rails/info/p

I'm running Rails 2.3.4. When I create a new rails project, the public/index.html file has a link named "About your appli开发者_StackOverflow社区cation's environment" that points to "rails/info/properties". In dev mode, it gives a summary of the runtime environment. However, in production mode, it gives a 404 page cannot be found.

Could someone point me in the direction of how and where the "rails/info/properties" route is configured? I'd just like to understand how it's set up.


The link fires off an AJAX request to rails/info/properties. The properties action is defined in the Rails::InfoController which lives in /rails/railties/builtin/rails_info/rails/info_controller.rb.

The route doesn't need to be explicitly defined because it conforms to the Rails default route of :controller/:action/:id (although there is no ID in this case and the controller lives within a Rails namespace.)


It's configured within Rails itself (when in development mode). You can probably track it down if you look through the Rails initialization code.

0

精彩评论

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