diff options
Diffstat (limited to 'activerecord/test/models/admin/user.rb')
-rw-r--r-- | activerecord/test/models/admin/user.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/test/models/admin/user.rb b/activerecord/test/models/admin/user.rb index 48a110bd23..2e703f6219 100644 --- a/activerecord/test/models/admin/user.rb +++ b/activerecord/test/models/admin/user.rb @@ -15,26 +15,26 @@ class Admin::User < ActiveRecord::Base belongs_to :account store :params, accessors: [ :token ], coder: YAML - store :settings, :accessors => [ :color, :homepage ] + store :settings, accessors: [ :color, :homepage ] store_accessor :settings, :favorite_food - store :preferences, :accessors => [ :remember_login ] - store :json_data, :accessors => [ :height, :weight ], :coder => Coder.new - store :json_data_empty, :accessors => [ :is_a_good_guy ], :coder => Coder.new + store :preferences, accessors: [ :remember_login ] + store :json_data, accessors: [ :height, :weight ], coder: Coder.new + store :json_data_empty, accessors: [ :is_a_good_guy ], coder: Coder.new def phone_number read_store_attribute(:settings, :phone_number).gsub(/(\d{3})(\d{3})(\d{4})/,'(\1) \2-\3') end def phone_number=(value) - write_store_attribute(:settings, :phone_number, value && value.gsub(/[^\d]/,'')) + write_store_attribute(:settings, :phone_number, value && value.gsub(/[^\d]/,"")) end def color - super || 'red' + super || "red" end def color=(value) - value = 'blue' unless %w(black red green blue).include?(value) + value = "blue" unless %w(black red green blue).include?(value) super end end |