diff options
| author | Kir | 2011-10-31 21:43:34 +0400 |
|---|---|---|
| committer | Kir | 2011-10-31 21:43:34 +0400 |
| commit | 48c144ed34e2d5977bb8e5af8a9c7e8dfc253361 (patch) | |
| tree | a672937fb96b955f3c2d4364195926b3b14d01cb /lib/inboxes.rb | |
| parent | 3ddd221f5f235e34afb9d4bbc7a4fc05228f73a4 (diff) | |
| download | inboxes-48c144ed34e2d5977bb8e5af8a9c7e8dfc253361.tar.bz2 | |
Small changed
Diffstat (limited to 'lib/inboxes.rb')
| -rw-r--r-- | lib/inboxes.rb | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/lib/inboxes.rb b/lib/inboxes.rb index 29bb078..9759f07 100644 --- a/lib/inboxes.rb +++ b/lib/inboxes.rb @@ -2,6 +2,26 @@ require "inboxes/version" require "inboxes/railtie" require "inboxes/engine" -# module Inboxes -# # Your code goes here... -# end +module Inboxes + # Your code goes here... + + def self.configure(&block) + yield @config ||= Inboxes::Configuration.new + end + + # Global settings for Inboxes + def self.config + @config + end + + # need a Class for 3.0 + class Configuration #:nodoc: + include ActiveSupport::Configurable + config_accessor :user_name + + def param_name + config.param_name.respond_to?(:call) ? config.param_name.call() : config.param_name + end + end + +end |
