Skip to content

Commit

Permalink
Use #update_attributes as #update_attribute is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenharman committed Jul 31, 2012
1 parent 2a15bb8 commit f8ff238
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/setler/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -56,5 +56,4 @@ def self.thing_scoped
end

end

end

0 comments on commit f8ff238

Please sign in to comment.