Hello,
In HAML, is it possible to get this result:
=> “wwwexamplecom”
So far I’ve only managed to get:
=> “com”
Which is logical because of the way Ruby blocks work. But, it defeats the HAML purpose of concatenating the things you put underneath each other.
CmdJohnson
Jeffrey
(Jeffrey)
2
Quoting Commander Johnson <commanderjohnson@gmail.com>:
Hello,
In HAML, is it possible to get this result:
- link_to "http://www.example.com" do
- "www"
- "example"
- "com"
What about:
- link_to "http://www.example.com" do
- ["www", "example", "com"]
Jeffrey
Hello,
In HAML, is it possible to get this result:
=> “wwwexamplecom”
this is because you use -, use =. but that would leave a space in between the words. you might want to wrap
each word in a span and remove the whitespace
= link_to url do
%span>= ‘www’
%span>= ‘example’
%span>= ‘com’