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
Kaminari 1.2.1 confuses HAML when giving link_to_prev_page a block #1033
Comments
Is that from the kaminari views? And when updating from kaminari-1.1.1 to kaminari-1.2.1 did you also update those views? |
Thanks for your attention! No, it's my own view. |
(Noting that this is still an issue, and is keeping me from upgrading to kaminari-1.2.1, despite the security issue in 1.1.1. I am not able to debug this issue inside kaminari myself, regrettably. I hope someone else is, eventually.) |
What happens if you take your own view out of the equation? Let me be clear I am not a regular contributor to kaminari but if I can assist you by asking stupid questions... :-) And since problem denial often is a workable solution - what happens if you change your view to erb since the problem seems to be haml related... That said and having a look at my kaminari views that are in haml as well I see that the views for the links are using #link_to_unless instead of #link_to_previous_page ... |
For the record:
|
I have some old code that used to work perfectly, and stopped working after (only) upgrading Kaminari from 1.1.1 to 1.2.1.
The observed problem was mangled display, caused by HAML (5.0.4) bizarrely re-parsing the template from the beginning, resulting in actual HAML code emitted to the user. I have managed to isolate the bit triggering this behavior -- again, a bit I haven't changed at all, that worked just fine with 1.1.1, and that bit is:
This block I'm passing is causing the HAML failure, somehow. If I remove the 'do' and the following two lines, the link is emitted (or not, if there is no prev page) just fine.
I have confirmed that reverting to Kaminari 1.1.1 makes this code work again.
Any thoughts?
The text was updated successfully, but these errors were encountered: