-
Notifications
You must be signed in to change notification settings - Fork 41
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
Cells in mailer views #14
Comments
So you're suggesting I should make a PR with similar code for ActionMailer ? (The code you pointed to only injects into ActionController and it's view_context but not And otherwise sorry, I was calling |
Uhm, yeah, why not, I actually never thought of the ActionMailer patch. Is that really necessary, though?? |
Well just now I was telling someone about the awesomeness of cells, and that we could also use it for Mailer views, then we got stuck for 30 minutes because |
Yeah but then you run into the next problem, what will be the parent controller in a mailer, and so on... The |
But I agree, Cells are awesome! 😆 |
Hey I still have some problems in cells in mailers with URL helpers.
My current solution is not to call directly The following seems to be the only way to make it work
|
This problem is still causing me headaches whenever I call new url_helpers in my mailer cell view and those are not delegated using the trick mentioned above. The stack trace also remains enigmatic so it took me some time to remember I had to re-delegate the helpers in my cell.rb file. |
What's the best way to add cells in my mailers ?
The
cell
method is not recognized in my mailers, I can still call the cells by doing.What's the proper way to include cells in Rails mailers, so I can call
cell(:my_cell, @my_object).(:cell_view)
Or is there an other way to call a cell and run the builder code to use the appropariate inherited cell.
The text was updated successfully, but these errors were encountered: