[Rails] ERB % tag shortcut
Gavin Sinclair
gsinclair at soyabean.com.au
Tue Nov 16 12:51:37 GMT 2004
On Tuesday, November 16, 2004, 10:32:19 PM, David wrote:
>> % A line of Ruby code goes here.
>>
>> Does Rails support this shortcut? I'm purposefully not looking up the
>> documentation, because if it does and I don't know by now, it's
>> perhaps not well enough documented.
> Interesting feature, didn't know about it. I'm a bit undecided as to
> whether I think it's a good idea. I could easily see how you could
> accidently trigger it.
Just for completeness, if you want a literal % at the start of the
line, you use (predictably enough) %%. And it's not like a mistake
would survive testing.
But I'm not suggesting it should be the default. And it's quite
possibly more trouble than it's worth to offer configuration.
> And I have <% %> and <%= %> assigned to hotkeys in TextMate anyway ;)
True, but creating and maintaining are different things :)
Gavin
More information about the Rails
mailing list