jamesearl-rails-settings 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,10 +38,8 @@ class Settings < ActiveRecord::Base
38
38
  else
39
39
 
40
40
  #default behavior
41
- if self.connection.tables.include?(self.table_name)
41
+ if ActiveRecord::Base.connected? and self.connection.tables.include?(self.table_name)
42
42
  self[method_name]
43
-
44
-
45
43
  else #ENV is table not created
46
44
  warn "#{self.table_name} table does not exist, fallback to ENV[#{method_name.upcase}]"
47
45
  ENV[method_name.upcase]
@@ -1,3 +1,3 @@
1
1
  module RailsSettings
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jamesearl-rails-settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-16 00:00:00.000000000 Z
12
+ date: 2012-04-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord