Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 application'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.

like image 540
Upgradingdave Avatar asked Jun 13 '10 19:06

Upgradingdave


2 Answers

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.)

like image 64
John Topley Avatar answered Sep 29 '22 08:09

John Topley


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

like image 35
yfeldblum Avatar answered Sep 29 '22 06:09

yfeldblum