Skip to content

Adding ability to pass classes to helpers #2

Description

@TheSmartnik

Hi!

I was thinking maybe it's worth implementing ability to pass classes to helpers methods.

Something like this

helpers MyAwesomeHelpers do
  def site_url
     "http://example.com"
  end
end

There are two possible workarounds, which doesn't seem very good to me:

include Rack::App::FrontEnd::Helpers.include Hanami::Helpers
helpers do
  include Hanami::Helpers
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions