Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delegates doesn't work for ActionView::Helpers and Webpacker::Helper #37

Open
pvcarrera opened this issue Jan 16, 2018 · 1 comment
Open

Comments

@pvcarrera
Copy link

The Trailblazer cells documentation http://trailblazer.to/gems/cells/rails.html#asset-helper suggests that action view helpers can be included using delegation delegates :parent_controller, :image_tag

I tried to use this approach to include the csrf_meta_tags stylesheet_pack_tag, javascript_pack_tag helpers in my Layout cell but it didn't work (method missing).

Then I tried to include these helpers to my cell using include and it worked fine:

module MyProject::Cell
  class Layout < Trailblazer::Cell
    include ActionView::Helpers::CsrfHelper
    include Webpacker::Helper
  end
end

Ah, almost forgot 😄 , Rails version: 5.1.4

Is this something that needs to be updated in the documentation?

@apotonick
Copy link
Member

That should definitely be in the docs, now that I hit this issue myself! 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants