From e072708cf2b15346a950bb2e45c423267b631bcb Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Mon, 5 May 2014 10:43:49 +0200 Subject: [PATCH] Bracket spacing and line wrap 80 chars --- lib/ransack/search.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ransack/search.rb b/lib/ransack/search.rb index bbdd12c..ab88678 100644 --- a/lib/ransack/search.rb +++ b/lib/ransack/search.rb @@ -15,7 +15,8 @@ module Ransack def initialize(object, params = {}, options = {}) params = {} unless params.is_a?(Hash) - (params ||= {}).delete_if { |k, v| [*v].all?{|i| i.blank? && i != false } } + (params ||= {}) + .delete_if { |k, v| [*v].all? { |i| i.blank? && i != false } } @context = Context.for(object, options) @context.auth_object = options[:auth_object] @base = Nodes::Grouping.new(@context, 'and') @@ -57,7 +58,8 @@ module Ransack when String self.sorts = [args] else - raise ArgumentError, "Invalid argument (#{args.class}) supplied to sorts=" + raise ArgumentError, + "Invalid argument (#{args.class}) supplied to sorts=" end end alias :s= :sorts=