search for: app_constants

Displaying 2 results from an estimated 2 matches for "app_constants".

2010 Apr 15
0
Please review #4400, "Avoid app_const when drawing routes in app generator"
The jist: by avoiding "MyApp::Application" in config/routes.rb generator template, those generated config/routes.rb work out-of-box when turning the app into an engine. https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4400-patch-avoid-app_const-when-drawing-routes-in-app-generator Thanks! --phil-- -- You received this message because you are subscribed to the
2007 Oct 04
0
Module + Constant Issue
...alues with the idea you could "override" these by specifying them in the specific environment file: At the end of config/environment.rb, add: module AppConstants IMPORTANT_VALUE = "x" unless defined?(AppConstants::IMPORTANT_VALUE) end 3) Create a Ruby module in the file lib/app_constants/list.rb, noting the "top level" name of the module matches the one specified in the environment file: module AppConstants module List LIST_CONSTANT = "list_constant" end end 3) Fire up the console and probe the constant values: Loading development environment. >&gt...