Bracket spacing and line wrap 80 chars

This commit is contained in:
Jon Atack 2014-05-05 10:43:49 +02:00
parent 5c6acda18d
commit e072708cf2
1 changed files with 4 additions and 2 deletions

View File

@ -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=