Permalink
Browse files

Revert "let's check for responding to :last method instead of checkin…

…g class"

This reverts commit 57dcc99.
  • Loading branch information...
1 parent 496b360 commit 5a45cf01866de537eea863c6df8a68af148de080 @nashby nashby committed Nov 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/simple_form/action_view_extensions/form_helper.rb
@@ -60,7 +60,7 @@ def simple_form_css_class(record, options)
elsif record.is_a?(String) || record.is_a?(Symbol)
as || record
else
- record = record.last if record.respond_to?(:last)
+ record = record.last if record.is_a?(Array)
action = record.respond_to?(:persisted?) && record.persisted? ? :edit : :new
as ? "#{action}_#{as}" : dom_class(record, action)
end

0 comments on commit 5a45cf0

Please sign in to comment.