cells
cells copied to clipboard
All cells escaped randomly locally and always in production
Hello!
I've been using cells fo some time now in one of my projects. Encountered some error once (i can't remember what exactly it was and found a solution in one of the issues here to put
def output_buffer=(*)
end
in my master cell (edit - i replaced it with include ActionView::Context
- https://github.com/hcxp/hcxp/blob/master/app/cells/application_cell.rb). I think that error was somehow related to that method being missed but can't really recall it right now. Anyway - after i added that method, my app started to randomly escape all the cells. I have no ide what it's related to but, for instance, sometimes changing something in locale files bring normal unescaped cells back. But problem comes back after next app restart.
The same thing happens on production.
My application is pretty small and can be found in here: https://github.com/hcxp/hcxp
Thanks in advanced for any clues!
Thats more or less how it look right now:
And i just realized that actually not ALL of the cells are escaped but i can't really see any regularity in this.
One last update - i've tried a lot of solutions from this thread and none of it worked. It's still the same, i just think i found the regularity - it behaves like this when i'm using a block argument (link_to do
or form_tag do
etc).
- Development - works just fine
- Production - block tags escaped
new rails 5.1 app, gems: 'slim-rails', 'cells-rails', 'cells-slim'
= link_to '/' do
strong ABCD
produces escaped HTML in development:
<strong>ABCD</strong>
Yepp, the newer versions of cells-rails do not support several helpers of Rails anymore that use global state buffering. We're sorry for the inconvenience but those few "helpers" would dramatically increase our code complexity. Maybe it's time to write our own link_to
helper that's done properly, and not a disgusting hack?
I have similar behavior even in development.
Are there any workarounds? Or I should write my own version of simple_form_for
? :-D