Allow overriding blank? method in drops
Author: h0jeZvgoxFepBQ2CCreated Jul 5, 2024Updated Feb 4, 2026
Hi,
we just figured out that overriding the methods blank? or present? doesn't work to be overriden in drops, f.e. we would like to do following:
{% if user.account %}
{% else %}
{% endif %}class AccountDrop < Liquid::Drop
def initialize(account)
@account = account
end
def blank?
@account.blank?
end
endBut it seems that this is not working? Also not with delegate or defs_delegators via forwardable ruby standard module?
Source: Shopify/liquid