Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove whitespace

  • Loading branch information...
commit e152ea2ed8dd1ed0f79e4744bee28a2237e15724 1 parent 3306d9b
Ben Johnson binarylogic authored
8 lib/searchlogic/active_record/consistency.rb
View
@@ -10,7 +10,7 @@ def self.included(klass)
alias_method_chain :merge_joins, :merged_duplicates
end
end
-
+
# In AR multiple joins are sometimes in a single join query, and other times they
# are not. The merge_joins method in AR should account for this, but it doesn't.
# This fixes that problem. This way there is one join per string, which allows
@@ -19,7 +19,7 @@ def merge_joins_with_singularity(*args)
joins = merge_joins_without_singularity(*args)
joins.collect { |j| j.is_a?(String) ? j.split(" ") : j }.flatten.uniq
end
-
+
# This method ensures that the order of the conditions in the joins are the same.
# The strings of the joins MUST be exactly the same for AR to remove the duplicates.
# AR is not consistent in this approach, resulting in duplicate joins errors when
@@ -38,8 +38,8 @@ def merge_joins_with_consistent_conditions(*args)
end
end.uniq
end
-
-
+
+
def merge_joins_with_merged_duplicates(*args)
args << "" if !Thread.current["searchlogic_delegation"]
joins = merge_joins_without_merged_duplicates(*args)
2  lib/searchlogic/core_ext/proc.rb
View
@@ -4,7 +4,7 @@ module Proc # :nodoc:
def self.included(klass)
klass.class_eval do
attr_accessor :searchlogic_options
-
+
def searchlogic_options
@searchlogic_options ||= {}
@searchlogic_options[:type] ||= :string
1  lib/searchlogic/named_scopes/association_conditions.rb
View
@@ -82,7 +82,6 @@ def association_condition_options(association, association_condition, poly_class
options = scope.scope(:find) if scope
end
-
prepare_named_scope_options(options, association, poly_class)
options
}
6 lib/searchlogic/search/conditions.rb
View
@@ -31,13 +31,13 @@ def delete(*names)
end
self
end
-
+
private
# This is here as a hook to allow people to modify the order in which the conditions are called, for whatever reason.
def conditions_array
@conditions.to_a
end
-
+
def write_condition(name, value)
@conditions[name] = value
end
@@ -49,7 +49,7 @@ def read_condition(name)
def mass_conditions
@mass_conditions ||= {}
end
-
+
def ignore_value?(value)
(value.is_a?(String) && value.blank?) || (value.is_a?(Array) && value.empty?)
end
4 lib/searchlogic/search/to_yaml.rb
View
@@ -7,7 +7,7 @@ def self.included(klass)
include InstanceMethods
end
end
-
+
module InstanceMethods
def to_yaml( opts = {} )
YAML::quick_emit( self, opts ) do |out|
@@ -18,7 +18,7 @@ def to_yaml( opts = {} )
end
end
end
-
+
def yaml_initialize(taguri, attributes = {})
self.klass = attributes["class_name"].constantize
self.current_scope = attributes["current_scope"]
Please sign in to comment.
Something went wrong with that request. Please try again.