-
Notifications
You must be signed in to change notification settings - Fork 169
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
Rails 5.0.1 Missing template when adding haml-rails to a rails engine #124
Comments
I came here to report this same issue. Adding haml-rails to the project that includes your Rails engine/plugin makes the problem go away, but I thought that adding haml-rails as a dependency would Just Work™. Btw, I'm on Rails 5.1.x (and same version for the engine). |
I get an error such as:
Notice not I have
|
My solution, as per this comment, was to add |
Just ran into this with 5.2.3 and can confirm that adding |
Adding I found a commit in the kaminari gem that fixes seemingly the same issue by specifying the rendering format: # this fails when called from an engine controller in Rails 7:
render_to_string(partial: 'table')
# specifying :html as a format makes it work:
render_to_string(partial: 'table', formats: [:html]) |
In engine_name/engine_name.gemspec, I added:
s.add_dependency "haml-rails"
In engine_name/lib/engine_name.rb, I added:
require "haml-rails"
In engine_name/lib/engine_name/engine.rb, I added:
I ran the 'bundle' command both in:
When going to the test/dummy directory and (re)start the rails server, when I then go to "localhost/engine_name/resource" I get a template missing.
The very same way of working, works fine in rails 4.2.8
The text was updated successfully, but these errors were encountered: