Dynamic Links within a namespace

Hello all!

I am new to all of this and I am trying to accomplish something, and I
am hoping that someone will be able to assist me…

I am trying to set up a namespace within a dynamic link. I have created
an admin namespace and I need to following link to go to
…/admin/people/xxx

<%= link_to(person) do %> <%= person.fname %> <%= person.lname %> <% end %>

Am I missing something from the controller or what? How do I get this
dynamic link to go to the namespace route and not the base page? Does
something go in the <%= link_to(person) do %> and if so what? I am just
so new to all of this, I am not sure how to solve this problem.

Thanks for any help!

Jason

you fail at
<%= link_to(person) do %>

You can follow me same as:

<%= link_to admin_person_path(person) do %> <%= person.fname %> <%= person.lname %> <% end %>

or short more

<%= link_to "#{person.fname} #{person.lname}".html_safe, admin_person_path(person) %>

This worked perfectly! Thank you!!!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs