We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video#empty?
Recently I found that usage of #present? or #blank? methods on a video object causes additional status queries
#present?
#blank?
This is because of ActiveSupport's definition of #blank? method
# @return [true, false] def blank? respond_to?(:empty?) ? !!empty? : !self end
It calls #empty? method on a video object
#empty?
# @return [Boolean] whether the video failed to upload to YouTube because # the video file is empty. def empty? status.failure_reason == 'emptyFile' end
Which was quite quirky for me , I didn't expect such behaviour
As a quick fix I would overwrite #blank? for a Video
Video
What do you think?
The text was updated successfully, but these errors were encountered:
I'm not sure, probably we should rename empty? or document somewhere that not to use blank? on videos.
empty?
blank?
Sorry, something went wrong.
No branches or pull requests
Recently I found that usage of
#present?
or#blank?
methods on a video object causes additional status queriesThis is because of ActiveSupport's definition of
#blank?
methodIt calls
#empty?
method on a video objectWhich was quite quirky for me , I didn't expect such behaviour
As a quick fix I would overwrite
#blank?
for aVideo
What do you think?
The text was updated successfully, but these errors were encountered: