Ist das der richtige Weg, um Anzeige/verketten von text mit Haml?

Ich bin sehr neu in Ruby on Rails und sogar neuere zu Haml, ich begann, es zu benutzen 2 Stunden. So bin ich nach einem Ruby on Rails-tutorial und beschlossen, Haml auf die Ansichten, aber ich bin mir nicht sicher, ob dies der richtige Weg, um Dinge anzuzeigen (es fühlt sich irgendwie komisch). Könnte jemand mich aufklären? 🙂

%h1= "About Us"
%p
  =link_to 'Ruby on Rails Tutorial','http://railstutorial.org' 
  &= 'is a project to make a book and screencasts to teach web development with'
  &= link_to 'Ruby on Rails', 'http://rubyonrails.org'
  &= '. This is the sample application for the tutorial.'

Habe ich versucht, auch diese:

:ruby
   first_link = link_to 'Ruby on Rails Tutorial','http://railstutorial.org' 
   second_link = link_to 'Ruby on Rails', 'http://rubyonrails.org'

%h1= "About Us"
%p
  = first_link
  &= 'is a project to make a book and screencasts to teach web development with'
  &= second_link
  &= '. This is the sample application for the tutorial.'
Schreibe einen Kommentar