-
-
Notifications
You must be signed in to change notification settings - Fork 31
Allow accessible scope exclusion for blank value #7
Conversation
@@ -28,6 +28,8 @@ def periscope_call(chain, scope, param) | |||
|
|||
if options[:boolean] | |||
values.first ? chain.send(method) : chain | |||
elsif options[:ignore_blank] | |||
values.first.empty? ? chain : chain.send(method) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not depend on Active Support here? Is that why you used empty?
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was bombing on one of the adapters so i just went with empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't investigate to far, just figured i couldn't depend on ActiveSupport to be there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as we're okay with:
> " ".blank?
=> true
> " ".empty?
=> false
How you have it now, you can't use the scope_accessible :age, ignore_blank: true
def self.age(age)
where(age: age)
end |
I also don't see any reason why |
Changes Unknown when pulling 275a077 on ersatzryan:ignore-blank into * on laserlemon:master*. |
looks like that error is a |
Changes Unknown when pulling d590fe0 on ersatzryan:ignore-blank into * on laserlemon:master*. |
♻️ 🙏 |
Allow accessible scope exclusion for blank value [ci skip]
No description provided.