Ruby on Rails 2.1 - HTML Links


Advertisements


Following is the quick view on link_to and mail_to.

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"

rails-quick-guide.htm

Advertisements