lib/rails-settings/settings.rb in rails-settings-cached-0.6.0 vs lib/rails-settings/settings.rb in rails-settings-cached-0.6.1
- old
+ new
@@ -102,10 +102,10 @@
new_value
end
def object(var_name)
- thing_scoped.where(var: var_name.to_s).first
+ table_exists? && thing_scoped.where(var: var_name.to_s).first
end
def thing_scoped
unscoped.where('thing_type is NULL and thing_id is NULL')
end