Skip to content

Allow overriding blank? method in drops #1812

@h0jeZvgoxFepBQ2C

Description

@h0jeZvgoxFepBQ2C

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
end

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions