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

All cells escaped randomly locally and always in production #443

Open
mbajur opened this issue Dec 22, 2016 · 5 comments
Open

All cells escaped randomly locally and always in production #443

mbajur opened this issue Dec 22, 2016 · 5 comments

Comments

@mbajur
Copy link

mbajur commented Dec 22, 2016

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!

@mbajur
Copy link
Author

mbajur commented Dec 22, 2016

Thats more or less how it look right now:

image

And i just realized that actually not ALL of the cells are escaped but i can't really see any regularity in this.

@mbajur
Copy link
Author

mbajur commented Dec 23, 2016

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

@batamire
Copy link

batamire commented Oct 4, 2017

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>

@apotonick
Copy link
Member

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?

@Mehonoshin
Copy link

I have similar behavior even in development.
Are there any workarounds? Or I should write my own version of simple_form_for? :-D

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