VIEW MORE ARTICLES
Rinas Writes
February 14, 2024
TIL: Ruby double equal in views <%== pagy_info(@pagy) %>
Encountered <%== pagy_info(@pagy) %> today and was wondering that the double equal (==) mean
Here is what I found:
Here is what I found:
- <% %>: Executes the Ruby code within the brackets but does not print the result to the template.
- <%= %>: Executes the Ruby code and prints the result to the template, with HTML escaping.
- <%== %>: Executes the Ruby code and prints the result to the template without HTML escaping.
So, in an example that prompted me to search, pagy_info(@pagy) is being called to generate pagination information, and the == ensures that the HTML generated by pagy_info is rendered as-is in the view, allowing for proper display of pagination links or information without escaping the HTML tags.
Recent writings
TIL: How to create new session in tmux and use ...
To create a new session in tmux tmux new -s sessionname Detach from the session crtl + b and then...
March 12, 2025
My remote work schedule
I have been working remotely for more than 5 years now. My work schedule had changed throughout ...
March 04, 2025
2025 is the year I'm going minimalist.
Sorry that's all I can share. (being a minimalist, you know... get it?) Joke aside, I have been...
January 17, 2025
Hello 2025, give me these:
Personal Health is my #1 priority this year, both mental and physical: • Go out for a walk and ...
January 07, 2025