Bracket spacing and line wrap 80 chars
This commit is contained in:
parent
5c6acda18d
commit
e072708cf2
|
@ -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=
|
||||
|
|
Loading…
Reference in New Issue