views:

129

answers:

2

Or rather I don't know how to specify the route for it.

I have my controller setup us:

def tags
  @clients = current_user.clients.find_tagged_with(params[:tag])
end

and my views

Tags:

<% for tag in @client.tags %>
  <%= link_to tag.name, clients_path(:view =>'tag', :tag => tag.name) %>
<% end %>

Only problem is that the link (clients_path) goes back to index and not 'all.' I know it has to do with changing the clients_path to somehow tell it to use 'all'. But I don't know how.

Any help?

Thanks

A: 

You can check your routes using rake routes.

I'm not sure what you mean by 'all' but if this is a custom method added to routes, then you should be able to use all_clients_path instead of clients_path.

klew
Yes all is a custom method I added, just didn't know how to specify the route. Thanks
Senthil
A: 

do we want to change in roots.rb for custom methods.lets take "signup" is method in clients and i want link_to in view .please give info how to use link_to using controller clients and action signup

guru