Skip to content
Browse files

* Check for the existence of id before undefining it.

  • Loading branch information...
1 parent 52e4adc commit 616bbb066dbbf769e831af81600279d54d8ab999 @binarylogic committed Jul 12, 2009
Showing with 7 additions and 3 deletions.
  1. +5 −1 CHANGELOG.rdoc
  2. +1 −1 lib/searchlogic/active_record_consistency.rb
  3. +1 −1 lib/searchlogic/search.rb
View
6 CHANGELOG.rdoc
@@ -1,4 +1,8 @@
-== 2.1.3
+== 2.1.4
+
+* Check for the existence of id before undefining it.
+
+== 2.1.3 released 2009-07-12
* Added a no conflic resolution for other libraries already using the "search" method. If you have a conflict, use "searchlogic".
* Put the hidden order field in a div, to be valid XHTML.
View
2 lib/searchlogic/active_record_consistency.rb
@@ -13,7 +13,7 @@ def self.included(klass)
# This fixes that problem.
def merge_joins_with_searchlogic(*args)
joins = merge_joins_without_searchlogic(*args)
- joins.collect { |j| j.split(" ") }.flatten.uniq
+ joins.collect { |j| j.is_a?(String) ? j.split(" ") : j }.flatten.uniq
end
end
end
View
2 lib/searchlogic/search.rb
@@ -39,7 +39,7 @@ def initialize(condition)
end
attr_accessor :klass, :current_scope, :conditions
- undef :id
+ undef :id if respond_to?(:id)
# Creates a new search object for the given class. Ex:
#

0 comments on commit 616bbb0

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