SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trying to add :title to a link

    I currently have this which generates my link

    Code:
    		<%=
    		  link_to_remote("Send Page",
    						 :url => { :controller => '/home', :action => 'send_page' },
    						 :method	=> :get)
    		%>
    I want to add a title onto the link. I know typically :title works, but doing so above won't work.

    thoughts?

    Thanks,
    Bryan

  2. #2
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you show us the code *with* :title => something, and the HTML output too?

  3. #3
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:

    Code:
    <%= link_to_remote("Send Page",
      { :url => { :controller => '/home', :action => 'send_page' }, :method => :get },
      {:title => 'Send this page'}) %>
    Basically you can use the last argument to set any HTML options... You can refer to the API documentation: http://api.rubyonrails.com/classes/A...r.html#M000412.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •