search for: before_filtter

Displaying 1 result from an estimated 1 matches for "before_filtter".

Did you mean: before_filter
2006 Apr 04
2
Application configuration options
...value. This maps very nicely to a configuration model. @config = Config.find(1) @config.smtp_server = ''smtp.mydomain.com'' .... Noiw, what''s the best way to make this available to the application? Here are my options: 1. Get the configuration on every request using a before_filtter Don''t like this because it always hits the DB, but it is always current 2. Load it up on application startup by populating this through environment.rb into a hash.. . fastest method, but then it never gets refreshed until the app is reloaded. 3. Use before_filter to put the hash i...