0

Recently, I decided to try a new gem for pagination and noticed quite an intresting construction:

<%== pagy_nav(@pagy) %>

I'd be prone to think it's a typo, but it repeats further:

<%== render partial: 'pagy/nav', locals: {pagy: @pagy} %>

Tried to google it with no result.

Alexander Gorg
  • 898
  • 11
  • 30
  • 3
    After a bit of looking around I found [this](https://stackoverflow.com/questions/7996695/what-is-the-difference-between-and-in-erb-in-rails#comment15090510_7996827) comment which asks the same question. The answer is *"The double equal means that the string is not escaped, as in raw."* - [Richard_G](https://stackoverflow.com/questions/7996695/what-is-the-difference-between-and-in-erb-in-rails#comment34435273_7996827) – 3limin4t0r Oct 01 '19 at 12:21
  • 3
    Answered here: https://stackoverflow.com/questions/13142326/what-does-do-in-rails-erb – weshouman Oct 01 '19 at 12:29
  • Yes, it's duplicate. I'm sorry! – Alexander Gorg Oct 01 '19 at 13:16
  • 2
    @AlexanderGorg No need to excuse yourself, ` – 3limin4t0r Oct 01 '19 at 14:20
  • @3limin4t0r, thanks a lot! I'll add symbolhound to favs! – Alexander Gorg Oct 02 '19 at 09:57

0 Answers0