Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1162 from st0012/auto-readonly

Fix #1161 by checking for column
  • Loading branch information...
commit 2cbc2ba57b83f09427199d069be41c83b30456c6 2 parents f849651 + 5aec5c6
@justinfrench authored
View
1  lib/formtastic/inputs/base/validations.rb
@@ -200,6 +200,7 @@ def readonly_attribute?
object_class = self.object.class
object_class.respond_to?(:readonly_attributes) &&
self.object.persisted? &&
+ column.respond_to?(:name) &&
object_class.readonly_attributes.include?(column.name.to_s)
end
View
1  spec/inputs/readonly_spec.rb
@@ -11,7 +11,6 @@
end
describe "placeholder text" do
-
[:email, :number, :password, :phone, :search, :string, :url, :text, :date_picker, :time_picker, :datetime_picker].each do |type|
describe "for #{type} inputs" do
Please sign in to comment.
Something went wrong with that request. Please try again.