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

Prevent validating rails templates #1

Closed
surajreddy opened this issue Mar 15, 2017 · 3 comments
Closed

Prevent validating rails templates #1

surajreddy opened this issue Mar 15, 2017 · 3 comments

Comments

@surajreddy
Copy link

Problem

Templates outside the app structure (ex: rails) are being validated.

Symptoms:

  • The email preview templates in rails that surround preview emails rails/mailers raise BetterHtml::DontInterpolateHere in Rails::Mailers#preview

Solution

TBD

@smenor
Copy link

smenor commented Mar 26, 2023

Any progress on this @EiNSTeiN- ? Still seems present in the latest for me

@rafaelfranca
Copy link
Member

It was fixed here a93ac11. Just ignore the files you don't want to be checked.

@rjwalters
Copy link

for anybody who runs into this same issue, add an initializer:

config/initializers/better-html.rb

if defined?(BetterHtml)
  BetterHtml.configure do |config|
    config.template_exclusion_filter = proc { |filename|
      !filename.start_with?(Rails.root.to_s)
    }
  end
end

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

4 participants