Skip to content

Commit

Permalink
Fixing issue with Searchlogic-form-objects causing Formtastic to blow…
Browse files Browse the repository at this point in the history
… up. Now works in my test-project - confusing to spec this one just for a certain plugin. Closing formtastic#155.
  • Loading branch information
grimen authored and justinfrench committed Jan 1, 2010
1 parent e57b9d1 commit 9730488
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/formtastic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def commit_button(*args)
options = args.extract_options!
text = options.delete(:label) || args.shift

if @object
if @object && @object.respond_to?(:new_record?)
key = @object.new_record? ? :create : :update
object_name = @object.class.human_name
else
Expand Down

0 comments on commit 9730488

Please sign in to comment.