On 8/4/07, florent <[EMAIL PROTECTED]> wrote:
>
>
> Hello,
>
> I am new to Haml and I try to apply it along reading Agile Web
> Development with Rails. How can I convert this line of rhtml?
>
> <%= link_to 'Previous page',
> { :page => @product_pages.current.previous } if
> @product_pages.current.previous %>
>
> The mere translation
> - link_to 'Previous page', { :page =>
> @product_pages.current.previous } if @product_pages.current.previous
> does not work.


The - executes ruby code but does not insert the result.  You need to use
the =
 = link_to 'Previous page', { :page =>
@product_pages.current.previou
>
> s } if @product_pages.current.previous



I believe that should work

HTH
Daniel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to