# dynamic configuration through a Configuration singleton model # configuration model # ------------------- # CONFIGURATION = Configuration # config.configuration_model = CONFIGURATION <% if defined? DataMapper -%> # config_instance = CONFIGURATION.get(1) || CONFIGURATION.new <% else -%> # config_instance = CONFIGURATION.find(1) || CONFIGURATION.new <%end -%> # notification email on errors and dump directory for the system dump # ------------------------------------------------------------------- # config_instance.register("error_dumper") do |config| # Rails.configuration.error_dumper.errors_dir = config.errors_dir # Rails.configuration.error_dumper.notifications = config.errors_from, config.errors_to # end # idle session timeout configuration (in minutes) # ----------------------------------------------- # config_instance.register("idle_session_timeout") do |config| # Rails.configuration.idle_session_timeout = config.idle_session_timeout # end # audit log manager # ----------------- # config.audit_manager.model = MyAudit # default: Audit # config.audit_manager.username_method = :username # default: :login # config_instance.register("audit_manager") do |config| # Rails.configuration.audit_manager.keep_log = config.keep_log # days # end # -------------------- # static configuration # -------------------- # error dumper # ------------ # notification email on errors and dump directory for the system dump # config.error_dumper.errors_dir = Rails.root + "/errors" # default: logs/errors # config.error_dumper.notifications = "no-reply@example.com", "developer1@example.com,developer2@example.com" # default: none - i.e. no email notifications # idle session timeout configuration # ---------------------------------- # config.idle_session_timeout = 30 #minutes # audit log manager # ----------------- # config.audit_manager.model = MyAudit # default: Audit # config.audit_manager.username_method = :username # default: :login # config.audit_manager.keep_log = 30 # days