Skip to content
Browse files

skip columns named 'lock_version' when automatically rendering fields…

… for all columns in the table (like we skip created_at, etc)
  • Loading branch information...
1 parent 3635588 commit 27af7ce75b9d18eb83df9211522968301e844a97 @justinfrench justinfrench committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/formtastic.rb
View
2 lib/formtastic.rb
@@ -241,7 +241,7 @@ def inputs(*args, &block)
if @object && args.empty?
args = @object.class.reflections.map { |n,_| n if _.macro == :belongs_to }
args += @object.class.content_columns.map(&:name)
- args -= %w[created_at updated_at created_on updated_on]
+ args -= %w[created_at updated_at created_on updated_on lock_version]
args.compact!
end
contents = args.map { |method| input(method.to_sym) }

0 comments on commit 27af7ce

Please sign in to comment.
Something went wrong with that request. Please try again.