text, t

An article by Gaspard Bucher

RubyLess evaluated string.

  1. action
  2. ajax
  3. API
  4. classes
  5. common attributes
    1. ..._if
    2. actions
    3. anchor
    4. attr
    5. date selection
    6. draggable
    7. eval
    8. label
    9. link params
    10. name
    11. prefix
    12. publish
    13. set_...
    14. status
    15. store
    16. text, t
    17. tlabel
    18. toggle
  6. conditions
  7. context
  8. dates
  9. display
  10. forms
  11. i18n
  12. meta
  13. SQLiss
  14. urls

This can be used in links to display static text:

<r:link text='copyright'/>

But even better, use “t” to avoid littering templates with fixed strings and be ready for multi-lingual support. This must be used along with a dictionary :

<r:link t='copyright'/>

Or it can be used to build more complex strings by evaluating ruby:

<r:link text='copyright #{owner.fullname}'/>

But since all methods that accept text as parameter usually evaluate the block, the example above might be more readable with:

<r:link>copyright <r:owner do='fullname'/></r:link>