Browse files

FIX: allow best in place to work with non active record objects again…

…, like arrays
  • Loading branch information...
1 parent 8c71f02 commit 1da2f22393f248724ba8d7c59b965ebe64d22aea Roger Campos committed May 13, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/best_in_place/utils.rb
View
1 lib/best_in_place/utils.rb
@@ -14,6 +14,7 @@ def build_best_in_place_id(object, field)
end
def object_to_key(object)
+ return object.class.to_s.underscore unless object.class.respond_to?(:model_name)
ActiveModel::Naming.param_key(object.class)
end
end

0 comments on commit 1da2f22

Please sign in to comment.