Skip to content
This repository
Browse code

Use #update_attributes as #update_attribute is deprecated

  • Loading branch information...
commit f8ff238e1bd583ee94f03a40e27a9277b4af4d1d 1 parent 2a15bb8
Steven Harman authored July 31, 2012

Showing 1 changed file with 3 additions and 4 deletions. Show diff stats Hide diff stats

  1. 7  lib/setler/settings.rb
7  lib/setler/settings.rb
@@ -2,10 +2,10 @@ module Setler
2 2
   class Settings < ActiveRecord::Base
3 3
     serialize :value
4 4
     self.abstract_class = true
5  
-    
  5
+
6 6
     cattr_accessor :defaults
7 7
     @@defaults = {}.with_indifferent_access
8  
-    
  8
+
9 9
     # Get and Set variables when the calling method is the variable name
10 10
     def self.method_missing(method, *args, &block)
11 11
       if respond_to?(method)
@@ -34,7 +34,7 @@ def self.[]=(var, value)
34 34
         var.to_s,
35 35
         @object.try(:class).try(:base_class).try(:to_s),
36 36
         @object.try(:id)
37  
-      ).update_attribute(:value, value)
  37
+      ).update_attributes({ :value => value })
38 38
     end
39 39
 
40 40
     def self.destroy(var_name)
@@ -56,5 +56,4 @@ def self.thing_scoped
56 56
     end
57 57
 
58 58
   end
59  
-
60 59
 end

0 notes on commit f8ff238

Please sign in to comment.
Something went wrong with that request. Please try again.