days 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/days/config.rb +9 -0
- data/lib/days/version.rb +1 -1
- metadata +1 -1
data/lib/days/config.rb
CHANGED
@@ -5,6 +5,14 @@ require 'settingslogic'
|
|
5
5
|
|
6
6
|
module Days
|
7
7
|
class Config < Settingslogic
|
8
|
+
def self.namespace(value = nil)
|
9
|
+
if value
|
10
|
+
@namespace = value
|
11
|
+
else
|
12
|
+
@namespace
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
8
16
|
namespace App.environment.to_s
|
9
17
|
|
10
18
|
def initialize(hash_or_file = {}, section = nil)
|
@@ -25,6 +33,7 @@ module Days
|
|
25
33
|
end
|
26
34
|
end
|
27
35
|
|
36
|
+
|
28
37
|
def establish_db_connection(force=false)
|
29
38
|
if Days::App.environment.to_sym == :development && (self.has_key?(:activerecord_log) ? self.activerecord_log == true : true)
|
30
39
|
ActiveRecord::Base.logger = Logger.new($stdout)
|
data/lib/days/version.rb
CHANGED