Skip to content
This repository
Browse code

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...
commit 5a8ec865701f42ee70db2c63a74cf381dbda8f66 2 parents 2a15bb8 + f8ff238
Chris Kelly authored

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 5a8ec86

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