Web | This Site

Learning Ruby on Rails
Ruby on Rails Quick Guide
Ruby Tutorial
Ruby on Rails Resources
Selected Reading
© 2011 TutorialsPoint.COM

| Home |  | References |  | Discussion Forums |  | About TP

# Rails and HTML Links

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"

Advertisement

Online Image Processing

Indian Baby Names