Re: [Rails] Rails 3 - Using link_to but adding a # for AJAX Deep Linking
Hi,
Try with
<%= link_to project.name, "#" + project %>
or
<%= link_to project.name, "#" + projects_path %>
Please let me know if it doesn't work out.
Thanks!
Butu
On Mon, Oct 4, 2010 at 7:12 AM, nobosh <bhellman1@gmail.com> wrote:
> Hello,
>
> Currently my links in Rails are using link_to as follows:
>
> <%= link_to project.name, project %>
>
> Which makes something like: `<a href="/projects/1">Project 1</a>`
>
> I'm working to implement an AJAX app with deep linking so instead of
> the above, I want the output to be (with a #): `<a href="#/projects/
> 1">Project 1</a>`
>
> Is there a way to get this to work with link_to? Or do I need some
> type of custom helper so I can use something like `link_deep_to`
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home