#1812·liquid

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:

xml

{% if user.account %}
{% else %}
{% endif %}
ruby
class AccountDrop < Liquid::Drop
  def initialize(account)
    @account = account
  end

   def blank?
    @account.blank?
  end
end

But it seems that this is not working? Also not with delegate or defs_delegators via forwardable ruby standard module?