samedi 18 avril 2020

How can I insert and variable in between 2 strings in ruby on rails

My code:

@pageb=2

<a data-remote="true" href="/?activities_page= @pageb &partial=true&render=activities"> >> </a>

URL I want:

http://localhost:9292/?activities_page=   2   &partial=true&render=activities

URL I get:

http://localhost:9292/?activities_page=   %20@pageb%20   &partial=true&render=activities

Aucun commentaire:

Enregistrer un commentaire