Tutorials Point

  Learning Ruby on Rails 2.1
  Advanced Ruby on Rails 2.1
  Ruby on Rails Quick Guide
  Ruby Tutorial
  Ruby on Rails Resources
  Selected Reading

Copyright © 2014 by tutorialspoint

  Home     References     Discussion Forums     About TP  

Ruby on Rails 2.1 and HTML Links

previous next AddThis Social Bookmark Button


Following is the quick view on link_to, mail_to. Check following link for more detail: URL Helper

link_to "Name", :controller => 'post', 
                :action => 'show', 
                :id => @post.id

link_to "Delete", { :controller => "admin",
                    :action => "delete",
                    :id => @post },
                  { :class => 'css-class',
                    :id => 'css-id',
                    :confirm => "Are you sure?" }

image_tag "spinner.png", :class => "image", :alt => "Spinner"

mail_to "info@invisible.ch", "send mail", 
        :subject => "Support request by #{@user.name}",
        :cc => @user.email,
        :body => '....',
        :encoding => "javascript"

stylesheet_link_tag "scaffold", "admin", :media => "all"

previous next Printer Friendly