Merge pull request #596 from retoo/master
readonly attributes comparison
This commit is contained in:
commit
840d115d57
|
@ -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
|
||||
|
|
|
@ -130,7 +130,7 @@ class User
|
|||
end
|
||||
|
||||
def self.readonly_attributes
|
||||
[:credit_card]
|
||||
["credit_card"]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue