Skip to content

Where does the global view helper need to be placed? #1888

Answered by jwoertink
zw963 asked this question in Q&A
Discussion options

You must be logged in to vote

You could either put this in src/components/shared or make a src/pages/mixins.

abstract class BaseLayout
  include Lucky::HTMLPage
  include PageHelpers

  def render
    content
  end
end

# src/pages/mixins
module PageHelpers
  def helper_foo

  end
end

Just be sure to require the new folder before your layouts.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zw963
Comment options

Answer selected by zw963
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants