Permalink
Browse files

Merge pull request #20 from stevenharman/use_update_attributes

Use #update_attributes as #update_attribute is deprecated in Rails 3.2.x
  • Loading branch information...
2 parents 2a15bb8 + f8ff238 commit 5a8ec865701f42ee70db2c63a74cf381dbda8f66 @ckdake committed Jul 31, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/setler/settings.rb
@@ -2,10 +2,10 @@ module Setler
class Settings < ActiveRecord::Base
serialize :value
self.abstract_class = true
-
+
cattr_accessor :defaults
@@defaults = {}.with_indifferent_access
-
+
# Get and Set variables when the calling method is the variable name
def self.method_missing(method, *args, &block)
if respond_to?(method)
@@ -34,7 +34,7 @@ def self.[]=(var, value)
var.to_s,
@object.try(:class).try(:base_class).try(:to_s),
@object.try(:id)
- ).update_attribute(:value, value)
+ ).update_attributes({ :value => value })
end
def self.destroy(var_name)
@@ -56,5 +56,4 @@ def self.thing_scoped
end
end
-
end

0 comments on commit 5a8ec86

Please sign in to comment.