Skip to content

Commit

Permalink
skip columns named 'lock_version' when automatically rendering fields…
Browse files Browse the repository at this point in the history
… for all columns in the table (like we skip created_at, etc)
  • Loading branch information
justinfrench committed May 30, 2009
1 parent 3635588 commit 27af7ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/formtastic.rb
Expand Up @@ -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) }
Expand Down

0 comments on commit 27af7ce

Please sign in to comment.