searchlogic icon indicating copy to clipboard operation
searchlogic copied to clipboard

arity warning when combining scopes with diffirent arity

Open toy opened this issue 15 years ago • 0 comments

Post.published_or_user_id_is(user) works well (finds published posts or created by specified user), but warns:

lib/searchlogic/named_scopes/conditions.rb:115: warning: multiple values for a block parameter (0 for 1)
    from lib/searchlogic/named_scopes/conditions.rb:173

Is it reasonable to fix this? Or better add possibility to define scope like Post.published.or_user_id_is(user), as …_or_… assumes that parameters should be sent to both scopes.

toy avatar Feb 25 '10 18:02 toy