Sha256: b1b853f625db38eca8f63257363f746bd7fc6609904d172f9b656ba69b910bb5
Contents?: true
Size: 447 Bytes
Versions: 29
Compression:
Stored size: 447 Bytes
Contents
module Hobo module Model module Scopes module ApplyScopes def apply_scopes(scopes) result = scoped scopes.each_pair do |scope, arg| if arg.is_a?(Array) result = result.send(scope, *arg) unless arg.first.blank? else result = result.send(scope, arg) unless arg.blank? end end result end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems