Merge pull request #596 from retoo/master

readonly attributes comparison
This commit is contained in:
Carlos Antonio da Silva 2012-06-21 06:54:15 -07:00
commit 840d115d57
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ module SimpleForm
def readonly_attribute?
object.class.respond_to?(:readonly_attributes) &&
object.persisted? &&
object.class.readonly_attributes.include?(attribute_name)
object.class.readonly_attributes.include?(attribute_name.to_s)
end
end
end

View File

@ -130,7 +130,7 @@ class User
end
def self.readonly_attributes
[:credit_card]
["credit_card"]
end
end