Outputs error class if argument is not empty. Example: Using error_class to show output an error class.
<input class="{{ form.errors.description | error_class }}" />
Outputs error fields inline in paragraph. Example: Using inline_errors to show errors inline.
{{ form.errors.description | inline_errors }}
Converts a supplied drop to URL parameter if possible. Example: Using to_param filter in liquid.
<h1>Signup to a service</h1>
<a href="{{ urls.signup }}?{{ service | to_param }}">Signup to {{ service.name }}</a>
Group collection by some key. Example: Group applications by service.
{% assign grouped = applications | group_by: 'service' %}
{% for group in grouped %}
Service: {{ group[0 }}
{% for app in group[1] %}
Application: {{ app.name }}
{% endfor %}
{% endfor %}
True if any string in the collection equals to the parameter. Example: Are there any pending apps of the current account?
{% assign has_pending_apps = current_account.applications | map: 'state' | any: 'live' %}
Stylesheet link
Javascript include tag
Image tag
Converts email address to a 'mailto' link.
{{ 'me@there.is' | mail_to }}
# => <a href="mailto:me@there.is">me@there.is</a>
Marks content as HTML safe so that it is not escaped.
Convert word to plural form
Generates a button to delete a resource present on the URL. First parameter is a URL, second is a title.
{{ 'Delete Message' | delete_button: message.url }}
Generates a button to delete a resource present on the URL using AJAX. First parameter is a URL, second is a title.
{{ 'Delete Message' | delete_button_ajax: message.url }}
Generates a button to update a resource present on the URL. First parameter is a URL, second is a title.
{{ 'Update Message' | update_button: message.url }}
Generates a button to create a resource present on the URL. First parameter is a URL, second is a title.
{{ 'Create Message' | create_button: message.url }}
Create link from given text.
{{ "See your App keys" | link_to:'/my-app-keys' }}