=link 'My Link', '= @some_variable'

4 views
Skip to first unread message

Martin

unread,
Jul 3, 2010, 1:54:51 AM7/3/10
to StaticMatic
The example in the subject does not work. The link href is output as
"= @some_variable"

How can I include variables inside links (and not only)?

Thanks a lot!

Lorin Tackett

unread,
Jul 3, 2010, 1:59:55 AM7/3/10
to stati...@googlegroups.com
One of two ways

= link 'Link Name', @some_variable
= link 'Link name', "some/path/#{@some_variable}"

you don't need to use quotes around variable names as part of any method, link or otherwise. The only time that's appropriate is when you are using the variable as part of another string. In that case, you'd use double quotes and the #{} syntax around the variable name.

-Lorin

> --
> You received this message because you are subscribed to the Google Groups "StaticMatic" group.
> To post to this group, send email to stati...@googlegroups.com.
> To unsubscribe from this group, send email to staticmatic...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/staticmatic?hl=en.
>

Reply all
Reply to author
Forward
0 new messages