Copyright © tutorialspoint.com

Ruby on Rails 2.1 and HTML Links

previous next

Advertisements

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

Copyright © tutorialspoint.com