mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
Fixed usage of #attribute_present? in UserPreference (#13008).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12126 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -33,7 +33,7 @@ class UserPreference < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def [](attr_name)
|
||||
if attribute_present? attr_name
|
||||
if has_attribute? attr_name
|
||||
super
|
||||
else
|
||||
others ? others[attr_name] : nil
|
||||
@@ -41,7 +41,7 @@ class UserPreference < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def []=(attr_name, value)
|
||||
if attribute_present? attr_name
|
||||
if has_attribute? attr_name
|
||||
super
|
||||
else
|
||||
h = (read_attribute(:others) || {}).dup
|
||||
|
||||
Reference in New Issue
Block a user