ruby on rails - pass helper url as unencoded to link_to url: -


i'm trying create link using 1 of helper paths so:

<%= link_to url: admin_url(group) %><i class="fa fa-eye"></i><% end %> 

but seems when rails renders page, elements looks like:

<a href="/admin?url=%2fadmin%2f1%2fedit"><i class="fa fa-pencil"></i></a> 

how link admin_url(group) ?

<%= link_to admin_url(group) %><i class="fa fa-eye"></i><% end %> 

passing hash first argument done if using polymorphic routing instead of route helper or literal path:

link_to(action: 'foo', controller: 'bar')   # name end 

missing routes keys may filled in current request's parameters (e.g. :controller, :action, :id , other parameters placed in path)

which gives /admin

url_for slurp non-reserved options url , add them query string why /admin?url=%2fadmin%2f1%2fedit".


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -