Este contenido no está disponible en el idioma seleccionado.
Chapter 1. Liquid Reference
1.1. What are liquids? Copiar enlaceEnlace copiado en el portapapeles!
Liquid is a simple programming language used for displaying and processing most of the data from the 3scale system available for API providers. Liquid was originally developed by Shopify and is used in many other Content Management System (CMS) engines throughout the web. In the 3scale platform, it is used to expose server-side data to your API developers, greatly extending the usefulness of the Developer Portal while maintaining a high level of security.
1.1.1. Pros and cons Copiar enlaceEnlace copiado en el portapapeles!
Liquids are mainly used to fetch and display server-side data on your Developer Portal pages. However there is much more power in liquids than just this. They serve very well for:
- Altering the DOM and content of a page based on server-side data
- Adding logic to pages, layouts, and partials
- Manipulating the email templates sent to developers
There are some use cases where liquids do not provide the best solution to the problem, mostly situations where you need to use dynamic data such as input from the user or the page URL.
Some general advice is to use them as the primary way to add logic to the page, but then if you find it impossible or overly complicated, switch to JavaScript (or add them to it, as liquids also work well with JS).
1.2. How to use liquids Copiar enlaceEnlace copiado en el portapapeles!
Liquid markup is divided into two types: logic tags and output tags. The logic tags, marked as {% %}, are conditional liquid statements that include standard programming language elements such as the if clause, loops, and so on.
{% if current_user %} <!-- if the user is logged in --> <a href="/logout">Logout</a> <!-- show the logout link --> {% else %} <!-- if the user is not logged in --> <a href="/login">Login</a> <!-- display the login link --> {% endif %}
{% if current_user %} <!-- if the user is logged in -->
<a href="/logout">Logout</a> <!-- show the logout link -->
{% else %} <!-- if the user is not logged in -->
<a href="/login">Login</a> <!-- display the login link -->
{% endif %}
Output tags, marked as {{ }}, are used to display the value of the tag between the curly braces.
{{ current_user.username }} <!-- display the logged-in user's username value -->
{{ current_user.username }} <!-- display the logged-in user's username value -->
For documentation on logic tags, please refer to the Shopify tutorial. The full reference of the 3scale liquid output tags can be found both in the tags section as well as in your Admin Portal under Help > Liquid Reference.
1.2.1. Liquid drops, tags, and filters Copiar enlaceEnlace copiado en el portapapeles!
In the 3scale Developer Portal, you will have access to three types of liquid markup:
-
liquid drops -
{{ current_account.name }}
-
liquid tags -
{% content %}
-
liquid filters -
{{ form.errors.description | error_class }}
Liquid drops, tags, and filters are similar to logic and output tags mentioned in How to use liquids.
Liquid drops are the most basic structure, and you will be using them most of the time. They give access to certain values stored in the system such as the name of the user and the identifier of the application. The interpreter handles them in the same way as any other output tags.
On the other hand, liquid tags are a type of logic tag that renders or accesses certain parts of the system for further customization – for example, to render content in the layout or customize email templates.
Filters enable the option of refining results from the drops, converting values, and grouping by some key. There is a group of standard liquid filters, which you can find on the Shopify website and a group of special 3scale internal filters, which are listed in the liquid reference section.
1.2.2. The context Copiar enlaceEnlace copiado en el portapapeles!
The context describes which variables (drops) are available to use on the current page. The basic set includes the following variables:
- provider
- urls
- current_user
- current_account
- today
These variables are available on every page throughout the Developer Portal, except for email templates. However, most of the built-in pages will have some additional variables available. For example, the edit user form will have a user variable exposed (instead of current user – on edit user page, the identity of the user is already known). To check which variables are available on the current page, there is a special tag: {% debug:help %}
. It adds the list of all the top-level variables available to use as a comment in the source of the page.
1.2.3. Hierarchy Copiar enlaceEnlace copiado en el portapapeles!
The direct consequence of the context is that the liquid drops are organized in a hierarchical structure. The available set of variables lists the top level drops that are available. Using them, you can get access to elements much deeper inside the hierarchy. For example, if you would like to show the username of the logged-in user, you would write {{ current_user.username }}
.
Displaying lower level drops is a little bit more complicated. Assume that you would like to display the name of the only application for a user. Looking at the reference guide, you can see that the method applications is a part of the account drop. This means that applications is an array of single-application tags. If your users are allowed to have more than one application, then you would have to iterate through them using the logic tags. Otherwise, you can refer to the first (and only) application on the account. The code to display this would look like this: {{ current_account.applications.first.name }}
.
1.3. Liquid templates Copiar enlaceEnlace copiado en el portapapeles!
The following variables are available in every Liquid template:
- provider - all your services, plans and settings under one hood
- urls - routes to built-in pages of the developers portal - login, signup
- current_user - username, address and rights of the currently logged-in user
- current_account - messages, applications and plans of the currently logged-in user
- today - current date
Builtin pages can also have other variables available, which are mentioned in the Developer Portal. For example, an edit user form edit will have a user
variable assigned or while displaying an application detail, you can expect to have a variable application
accessible.
The type of a variable is important to know to use this reference and can be determined by putting a {% debug:help %}
tag into the page which will list all the available variables and its types in an HTML comment for you. However, usually they can be guessed quite easily from the method or variable name.
1.4. Drops Copiar enlaceEnlace copiado en el portapapeles!
- Account drop
- AccountPlan drop
- Alert drop
- Application drop
- ApplicationKey drop
- ApplicationPlan drop
- Base drop
- Base drop
- BillingAddressField drop
- Can drop
- Can drop
- Cas drop
- Contract drop
- Country drop
- CountryField drop
- CurrentUser drop
- Error drop
- Errors drop
- Feature drop
- Field drop
- Flash drop
- Forum drop
- I18n drop
- Invitation drop
- Invoice drop
- LineItem drop
- Message drop
- Message drop
- Metric drop
- Page drop
- Page drop
- Pagination drop
- Part drop
- PaymentGateway drop
- PaymentTransaction drop
- PlanFeature drop
- Post drop
- Post drop
- PricingRule drop
- Provider drop
- ReferrerFilter drop
- Request drop
- Role drop
- Search drop
- Service drop
- ServiceContract drop
- ServicePlan drop
- TimeZone drop
- Today drop
- Topic drop
- Topic drop
- URL drop
- URLs drop
- UsageLimit drop
- User drop
1.5. Tags Copiar enlaceEnlace copiado en el portapapeles!
- Tag 'braintree_customer_form'
- Tag 'csrf'
- Tag 'content'
- Tag 'content_for'
- Tag 'debug'
- Tag 'email'
- Tag 'flash'
- Tag 'footer'
- Tag 'form'
- Tag 'latest_forum_posts'
- Tag 'latest_messages'
- Tag 'logo'
- Tag 'menu'
- Tag 'oldfooter'
- Tag 'plan_widget'
- Tag 'portlet'
- Tag 'submenu'
- Tag '3scale_essentials'
- Tag 'user_widget'
1.6. Filters Copiar enlaceEnlace copiado en el portapapeles!
1.7. Drops (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.1. Account drop (up) Copiar enlaceEnlace copiado en el portapapeles!
A developer account. See User
drop if you are looking for the email addresses or similar information.
1.7.1.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.1.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ account.errors.name | inline_errors }}
{{ account.errors.name | inline_errors }}
1.7.1.1.2. id Copiar enlaceEnlace copiado en el portapapeles!
Returns the id of the account
1.7.1.1.3. name Copiar enlaceEnlace copiado en el portapapeles!
Returns the organization name of the developer’s account
1.7.1.1.4. vat_zero_text Copiar enlaceEnlace copiado en el portapapeles!
Return a text about a vat zero
1.7.1.1.5. vat_rate Copiar enlaceEnlace copiado en el portapapeles!
Return the vat rate
1.7.1.1.6. unread_messages Copiar enlaceEnlace copiado en el portapapeles!
Unread messages
1.7.1.1.7. latest_messages Copiar enlaceEnlace copiado en el portapapeles!
Return the latest messages
1.7.1.1.8. bought_account_plan Copiar enlaceEnlace copiado en el portapapeles!
Returns the plan the account has contracted
1.7.1.1.9. bought_account_contract Copiar enlaceEnlace copiado en el portapapeles!
Returns the contract account
1.7.1.1.10. credit_card_display_number Copiar enlaceEnlace copiado en el portapapeles!
1.7.1.1.11. credit_card_expiration_date Copiar enlaceEnlace copiado en el portapapeles!
1.7.1.1.12. credit_card_required? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the account is required to enter credit card details
1.7.1.1.13. credit_card_stored? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the account has credit card details stored
1.7.1.1.14. credit_card_missing? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the account has no credit card details stored
1.7.1.1.15. timezone Copiar enlaceEnlace copiado en el portapapeles!
Returns timezone of this account
1.7.1.1.16. paid? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the account has at least a paid contract
1.7.1.1.17. on_trial? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the account is on trial period, i.e. all his paid contracts has to be in trial period
1.7.1.1.18. telephone_number Copiar enlaceEnlace copiado en el portapapeles!
Returns the telephone number of the account
1.7.1.1.19. approval_required? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the account requires approval?
1.7.1.1.20. created_at Copiar enlaceEnlace copiado en el portapapeles!
Returns UNIX timestamp of account creation (signup) Example: Converting timestamp to JavaScript Date
<script> var data = new Date({{ account.created_at }} * 1000); </script>
<script>
var data = new Date({{ account.created_at }} * 1000);
</script>
1.7.1.1.21. full_address Copiar enlaceEnlace copiado en el portapapeles!
Can be composed by legal address, city and state
1.7.1.1.22. applications Copiar enlaceEnlace copiado en el portapapeles!
Returns the applications of the account
1.7.1.1.23. subscribed_services Copiar enlaceEnlace copiado en el portapapeles!
Returns a array with ServiceContract drops
1.7.1.1.24. admin Copiar enlaceEnlace copiado en el portapapeles!
Returns the admin user of this account
1.7.1.1.25. extra_fields_plain_text Copiar enlaceEnlace copiado en el portapapeles!
Returns the extra fields defined for the account as plain text
1.7.1.1.26. fields_plain_text Copiar enlaceEnlace copiado en el portapapeles!
Returns the fields defined for the account as plain text
1.7.1.1.27. extra_fields Copiar enlaceEnlace copiado en el portapapeles!
Returns only extra fields with values of this account Example: Print all extra fields
{% for field in account.extra_fields %} {{ field.label }}: {{ field.value }} {% endfor %}
{% for field in account.extra_fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
1.7.1.1.28. fields Copiar enlaceEnlace copiado en el portapapeles!
Returns all fields with values of this account Example: Print all fields
{% for field in account.fields %} {{ field.label }}: {{ field.value }} {% endfor %}
{% for field in account.fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
1.7.1.1.29. builtin_fields Copiar enlaceEnlace copiado en el portapapeles!
1.7.1.1.30. multiple_applications_allowed? Copiar enlaceEnlace copiado en el portapapeles!
1.7.1.1.31. billing_address Copiar enlaceEnlace copiado en el portapapeles!
Returns the billing address of this account
1.7.1.1.32. has_billing_address? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether this account has a billing address or not
1.7.1.1.33. can Copiar enlaceEnlace copiado en el portapapeles!
Give access to permission methods
{% if account.can.be_deleted? %} <!-- do something --> {% endif %}
{% if account.can.be_deleted? %}
<!-- do something -->
{% endif %}
1.7.1.1.34. edit_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.1.1.35. edit_ogone_billing_address_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.1.1.36. edit_payment_express_billing_address_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.1.1.37. edit_braintree_blue_credit_card_details_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.1.1.38. domain Copiar enlaceEnlace copiado en el portapapeles!
1.7.1.1.39. upgraded? Copiar enlaceEnlace copiado en el portapapeles!
1.7.1.1.40. requires_credit_card? Copiar enlaceEnlace copiado en el portapapeles!
1.7.1.1.41. support_email Copiar enlaceEnlace copiado en el portapapeles!
1.7.1.1.42. finance_support_email Copiar enlaceEnlace copiado en el portapapeles!
1.7.2. AccountPlan drop (up) Copiar enlaceEnlace copiado en el portapapeles!
Example: Using account plan drop in liquid
<p class="notice">The examples for plan drop apply here</p>
<p class="notice">The examples for plan drop apply here</p>
1.7.2.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.2.1.1. selected? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the plan is selected
{% if plan.selected? %} <p>You will signup to {{ plan.name }}</p> {% endif %}
{% if plan.selected? %}
<p>You will signup to {{ plan.name }}</p>
{% endif %}
1.7.2.1.2. bought? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the plan is bought
{% if plan.bought? %} <p>You are on this plan already!</p> {% endif %}
{% if plan.bought? %}
<p>You are on this plan already!</p>
{% endif %}
1.7.2.1.3. features Copiar enlaceEnlace copiado en el portapapeles!
Returns an array of available features
1.7.2.1.4. setup_fee Copiar enlaceEnlace copiado en el portapapeles!
Returns the setup fee
1.7.2.1.5. name Copiar enlaceEnlace copiado en el portapapeles!
Returns the name of the plan
<h2>We offer you a new {{ plan.name }} plan!</h2>
<h2>We offer you a new {{ plan.name }} plan!</h2>
1.7.2.1.6. system_name Copiar enlaceEnlace copiado en el portapapeles!
Returns the system name of the plan
1.7.2.1.7. id Copiar enlaceEnlace copiado en el portapapeles!
Returns the plan id
1.7.2.1.8. free? Copiar enlaceEnlace copiado en el portapapeles!
The plan is free if it is not paid
. See the paid? method
1.7.2.1.9. paid? Copiar enlaceEnlace copiado en el portapapeles!
The plan is paid
when it has non-zero fixed or setup fee or there are some pricing rules present
{% if plan.paid? %} <p>this plan is a paid one.</p> {% else %} <p>this plan is a free one.</p> {% endif %}
{% if plan.paid? %}
<p>this plan is a paid one.</p>
{% else %}
<p>this plan is a free one.</p>
{% endif %}
1.7.2.1.10. approval_required? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the plan requires approval?
{% if plan.approval_required? %} <p>This plan requires approval.</p> {% endif %}
{% if plan.approval_required? %}
<p>This plan requires approval.</p>
{% endif %}
1.7.2.1.11. flat_cost Copiar enlaceEnlace copiado en el portapapeles!
Returns the monthly fixed fee of the plan
1.7.3. Alert drop (up) Copiar enlaceEnlace copiado en el portapapeles!
Example: Using alert drop in liquid
<h2>Alert details</h2> Level {{ alert.level }} Message {{ alert.message }} Utilization {{ alert.utilization }}
<h2>Alert details</h2>
Level {{ alert.level }}
Message {{ alert.message }}
Utilization {{ alert.utilization }}
1.7.3.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.3.1.1. level Copiar enlaceEnlace copiado en el portapapeles!
The alert level can be one of 50, 80, 90, 100, 120, 150, 200, 300.
1.7.3.1.2. message Copiar enlaceEnlace copiado en el portapapeles!
Text message describing the alert, for example hits per minute: 5 of 5
1.7.3.1.3. utilization Copiar enlaceEnlace copiado en el portapapeles!
Decimal number marking the actual utilization that triggered the alert 1.0 is equal to 100%.
Used by {{ alert.utilization | times: 100 }} percent.
Used by {{ alert.utilization | times: 100 }} percent.
1.7.4. Application drop (up) Copiar enlaceEnlace copiado en el portapapeles!
Example: Using application drop in liquid
<h2>Application {{ application.name }} ({{ application.application_id }})</h2> <p>{{ application.description }}</p>
<h2>Application {{ application.name }} ({{ application.application_id }})</h2>
<p>{{ application.description }}</p>
1.7.4.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ application.errors.name | inline_errors }}
{{ application.errors.name | inline_errors }}
1.7.4.1.2. id Copiar enlaceEnlace copiado en el portapapeles!
Returns the id of the application
1.7.4.1.3. can_change_plan? Copiar enlaceEnlace copiado en el portapapeles!
Returns true
if changing of the application is allowed either directly or by request.
1.7.4.1.4. trial? Copiar enlaceEnlace copiado en el portapapeles!
Returns true if the contract is still in the trial period.
Note: If you change the trial period length of a plan, it does not affect the existing contracts.
1.7.4.1.5. live? Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.6. state Copiar enlaceEnlace copiado en el portapapeles!
There are three possible states:
- pending - live - suspended
- pending
- live
- suspended
1.7.4.1.7. remaining_trial_period_days Copiar enlaceEnlace copiado en el portapapeles!
Number of day still left in the trial period.
1.7.4.1.8. plan Copiar enlaceEnlace copiado en el portapapeles!
Returns a plan drop with the plan of the application
1.7.4.1.9. plan_change_permission_name Copiar enlaceEnlace copiado en el portapapeles!
Returns name of the allowed action
1.7.4.1.10. plan_change_permission_warning Copiar enlaceEnlace copiado en el portapapeles!
Returns a warning messenger of the allowed action
1.7.4.1.11. contract Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.12. admin_url Copiar enlaceEnlace copiado en el portapapeles!
Returns the admin_url of the application
1.7.4.1.13. name Copiar enlaceEnlace copiado en el portapapeles!
Returns the name of the application
1.7.4.1.14. can Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.15. oauth Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.16. pending? Copiar enlaceEnlace copiado en el portapapeles!
Returns true
if application state is pending
1.7.4.1.17. buyer_alerts_enabled? Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.18. description Copiar enlaceEnlace copiado en el portapapeles!
Returns the description of the application
1.7.4.1.19. redirect_url Copiar enlaceEnlace copiado en el portapapeles!
Returns the redirect url for the OAuth of the application
1.7.4.1.20. filters_limit Copiar enlaceEnlace copiado en el portapapeles!
Returns the amount of referrer filters allowed for this application
1.7.4.1.21. keys_limit Copiar enlaceEnlace copiado en el portapapeles!
Returns the amount of application keys allowed for this application
1.7.4.1.22. referrer_filters Copiar enlaceEnlace copiado en el portapapeles!
Returns the referrer filters associated with this application
1.7.4.1.23. rejection_reason Copiar enlaceEnlace copiado en el portapapeles!
Returns the reason for rejecting an application
1.7.4.1.24. user_key Copiar enlaceEnlace copiado en el portapapeles!
Returns the user_key of application
1.7.4.1.25. application_id Copiar enlaceEnlace copiado en el portapapeles!
Returns the application_id of an application
1.7.4.1.26. key Copiar enlaceEnlace copiado en el portapapeles!
Returns the application id or the user key
1.7.4.1.27. url Copiar enlaceEnlace copiado en el portapapeles!
Returns URL of the builtin detail view for this application.
1.7.4.1.28. edit_url Copiar enlaceEnlace copiado en el portapapeles!
Returns URL of the builtin edit view for this application.
1.7.4.1.29. update_user_key_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.30. log_requests_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.31. alerts_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.32. application_keys_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.33. service Copiar enlaceEnlace copiado en el portapapeles!
Service to which that application belongs to.
1.7.4.1.34. keys Copiar enlaceEnlace copiado en el portapapeles!
Returns the keys of an application
1.7.4.1.35. user_key_mode? Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.36. app_id_mode? Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.37. change_plan_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.38. log_requests? Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.39. application_keys Copiar enlaceEnlace copiado en el portapapeles!
1.7.4.1.40. extra_fields Copiar enlaceEnlace copiado en el portapapeles!
Returns non-hidden extra fields with values for this application Example: Print all extra fields
{% for field in application.extra_fields %} {{ field.label }}: {{ field.value }} {% endfor %}
{% for field in application.extra_fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
1.7.4.1.41. fields Copiar enlaceEnlace copiado en el portapapeles!
Returns all builtin and extra fields with values for this application Example: Print all fields
{% for field in application.fields %} {{ field.label }}: {{ field.value }} {% endfor %}
{% for field in application.fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
1.7.4.1.42. builtin_fields Copiar enlaceEnlace copiado en el portapapeles!
Returns only builtin fields of the application
1.7.4.1.43. cinstance Copiar enlaceEnlace copiado en el portapapeles!
1.7.5. ApplicationKey drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.5.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.5.1.1. id Copiar enlaceEnlace copiado en el portapapeles!
1.7.5.1.2. value Copiar enlaceEnlace copiado en el portapapeles!
1.7.5.1.3. url Copiar enlaceEnlace copiado en el portapapeles!
1.7.5.1.4. application Copiar enlaceEnlace copiado en el portapapeles!
1.7.6. ApplicationPlan drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.6.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.6.1.1. selected? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the plan is selected
{% if plan.selected? %} <p>You will signup to {{ plan.name }}</p> {% endif %}
{% if plan.selected? %}
<p>You will signup to {{ plan.name }}</p>
{% endif %}
1.7.6.1.2. bought? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the plan is bought
{% if plan.bought? %} <p>You are on this plan already!</p> {% endif %}
{% if plan.bought? %}
<p>You are on this plan already!</p>
{% endif %}
1.7.6.1.3. features Copiar enlaceEnlace copiado en el portapapeles!
Returns the visible features of the plan
{% if plan == my_free_plan %} <p>These plans are the same.</p> {% else %} <p>These plans are not the same.</p> {% endif %}
{% if plan == my_free_plan %}
<p>These plans are the same.</p>
{% else %}
<p>These plans are not the same.</p>
{% endif %}
1.7.6.1.4. setup_fee Copiar enlaceEnlace copiado en el portapapeles!
Returns the setup fee of the plan
1.7.6.1.5. name Copiar enlaceEnlace copiado en el portapapeles!
Returns the name of the plan
<h2>We offer you a new {{ plan.name }} plan!</h2>
<h2>We offer you a new {{ plan.name }} plan!</h2>
1.7.6.1.6. system_name Copiar enlaceEnlace copiado en el portapapeles!
Returns the system name of the plan
1.7.6.1.7. id Copiar enlaceEnlace copiado en el portapapeles!
Returns the plan id
1.7.6.1.8. free? Copiar enlaceEnlace copiado en el portapapeles!
The plan is free if it is not paid
. See the paid? method.
1.7.6.1.9. paid? Copiar enlaceEnlace copiado en el portapapeles!
The plan is paid
when it has non-zero fixed or setup fee or there are some pricing rules present
{% if plan.paid? %} <p>this plan is a paid one.</p> {% else %} <p>this plan is a free one.</p> {% endif %}
{% if plan.paid? %}
<p>this plan is a paid one.</p>
{% else %}
<p>this plan is a free one.</p>
{% endif %}
1.7.6.1.10. approval_required? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the plan requires approval?
{% if plan.approval_required? %} <p>This plan requires approval.</p> {% endif %}
{% if plan.approval_required? %}
<p>This plan requires approval.</p>
{% endif %}
1.7.6.1.11. flat_cost Copiar enlaceEnlace copiado en el portapapeles!
Returns the monthly fixed fee of the plan
1.7.6.1.12. metrics Copiar enlaceEnlace copiado en el portapapeles!
Returns the metrics of the plan
1.7.6.1.13. usage_limits Copiar enlaceEnlace copiado en el portapapeles!
Returns the usage limits of the plan
1.7.6.1.14. service Copiar enlaceEnlace copiado en el portapapeles!
Returns the service of the plan
1.7.7. Base drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.7.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.7.1.1. login_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.7.1.2. user_identified? Copiar enlaceEnlace copiado en el portapapeles!
1.7.8. Base drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.8.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.8.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ base.errors.name | inline_errors }}
{{ base.errors.name | inline_errors }}
1.7.8.1.2. title Copiar enlaceEnlace copiado en el portapapeles!
Returns the title result
1.7.8.1.3. kind Copiar enlaceEnlace copiado en el portapapeles!
Returns the kind of result, can be 'topic' or 'page'
1.7.8.1.4. url Copiar enlaceEnlace copiado en el portapapeles!
Returns the resource url of the result
1.7.8.1.5. description Copiar enlaceEnlace copiado en el portapapeles!
Returns a descriptive string for the result
1.7.9. BillingAddressField drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.9.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.9.1.1. input_name Copiar enlaceEnlace copiado en el portapapeles!
1.7.9.1.2. label Copiar enlaceEnlace copiado en el portapapeles!
1.7.9.1.3. choices Copiar enlaceEnlace copiado en el portapapeles!
1.7.9.1.4. errors Copiar enlaceEnlace copiado en el portapapeles!
1.7.9.1.5. html_id Copiar enlaceEnlace copiado en el portapapeles!
1.7.9.1.7. visible? Copiar enlaceEnlace copiado en el portapapeles!
1.7.9.1.8. read_only? Copiar enlaceEnlace copiado en el portapapeles!
1.7.9.1.9. name Copiar enlaceEnlace copiado en el portapapeles!
1.7.9.1.10. value Copiar enlaceEnlace copiado en el portapapeles!
1.7.9.1.11. required Copiar enlaceEnlace copiado en el portapapeles!
1.7.10. Can drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.10.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.10.1.1. be_updated? Copiar enlaceEnlace copiado en el portapapeles!
1.7.10.1.2. add_referrer_filters? Copiar enlaceEnlace copiado en el portapapeles!
1.7.10.1.3. add_application_keys? Copiar enlaceEnlace copiado en el portapapeles!
1.7.10.1.4. regenerate_user_key? Copiar enlaceEnlace copiado en el portapapeles!
1.7.10.1.5. regenerate_oauth_secret? Copiar enlaceEnlace copiado en el portapapeles!
1.7.10.1.6. manage_keys? Copiar enlaceEnlace copiado en el portapapeles!
1.7.10.1.7. delete_key? Copiar enlaceEnlace copiado en el portapapeles!
1.7.11. Can drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.11.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.11.1.1. change_plan? Copiar enlaceEnlace copiado en el portapapeles!
1.7.12. Cas drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.12.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.12.1.1. login_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.12.1.2. user_identified? Copiar enlaceEnlace copiado en el portapapeles!
1.7.13. Contract drop (up) Copiar enlaceEnlace copiado en el portapapeles!
Plan of the contract {{ contract.plan.name }}
Plan of the contract {{ contract.plan.name }}
1.7.13.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.13.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ contract.errors.name | inline_errors }}
{{ contract.errors.name | inline_errors }}
1.7.13.1.2. id Copiar enlaceEnlace copiado en el portapapeles!
Returns the id
1.7.13.1.3. can_change_plan? Copiar enlaceEnlace copiado en el portapapeles!
Returns true if any form of change is possible
1.7.13.1.4. trial? Copiar enlaceEnlace copiado en el portapapeles!
Returns true if the contract is still in the trial period.
Note: If you change the trial period length of a plan, it does not affect the existing contracts.
1.7.13.1.5. live? Copiar enlaceEnlace copiado en el portapapeles!
1.7.13.1.6. state Copiar enlaceEnlace copiado en el portapapeles!
There are three possible states:
- pending - live - suspended
- pending
- live
- suspended
1.7.13.1.7. remaining_trial_period_days Copiar enlaceEnlace copiado en el portapapeles!
Number of day still left in the trial period.
1.7.13.1.8. plan Copiar enlaceEnlace copiado en el portapapeles!
Returns the plan of the contract
1.7.13.1.9. plan_change_permission_name Copiar enlaceEnlace copiado en el portapapeles!
Returns name of the allowed action
1.7.13.1.10. plan_change_permission_warning Copiar enlaceEnlace copiado en el portapapeles!
Returns a warning messenger of the allowed action
1.7.13.1.11. contract Copiar enlaceEnlace copiado en el portapapeles!
1.7.14. Country drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.14.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.14.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ country.errors.name | inline_errors }}
{{ country.errors.name | inline_errors }}
1.7.14.1.2. to_str Copiar enlaceEnlace copiado en el portapapeles!
1.7.14.1.3. code Copiar enlaceEnlace copiado en el portapapeles!
1.7.14.1.4. label Copiar enlaceEnlace copiado en el portapapeles!
1.7.15. CountryField drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.15.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.15.1.1. value Copiar enlaceEnlace copiado en el portapapeles!
Returns ID of the country
{{ account.fields.country.value }} => 42 compare with: {{ account.fields.country }} => 'United States'
{{ account.fields.country.value }} => 42
compare with:
{{ account.fields.country }} => 'United States'
1.7.15.1.2. name Copiar enlaceEnlace copiado en el portapapeles!
Returns system name of the field
1.7.15.1.3. required Copiar enlaceEnlace copiado en el portapapeles!
1.7.15.1.6. visible? Copiar enlaceEnlace copiado en el portapapeles!
1.7.15.1.7. visible Copiar enlaceEnlace copiado en el portapapeles!
1.7.15.1.8. read_only Copiar enlaceEnlace copiado en el portapapeles!
1.7.15.1.9. errors Copiar enlaceEnlace copiado en el portapapeles!
1.7.15.1.10. input_name Copiar enlaceEnlace copiado en el portapapeles!
1.7.15.1.11. html_id Copiar enlaceEnlace copiado en el portapapeles!
1.7.15.1.12. label Copiar enlaceEnlace copiado en el portapapeles!
Returns label of the field
{{ account.fields.country.label }} <!-- => 'Country' -->
{{ account.fields.country.label }}
<!-- => 'Country' -->
1.7.15.1.13. to_str Copiar enlaceEnlace copiado en el portapapeles!
Returns name of the country
{{ account.fields.country }} => 'United States'
{{ account.fields.country }} => 'United States'
1.7.15.1.14. choices Copiar enlaceEnlace copiado en el portapapeles!
1.7.16. CurrentUser drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.16.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.16.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ current_user.errors.name | inline_errors }}
{{ current_user.errors.name | inline_errors }}
1.7.16.1.2. admin? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the user is an admin.
{% if user.admin? %} <p>You are an admin of your account.</p> {% endif %}
{% if user.admin? %}
<p>You are an admin of your account.</p>
{% endif %}
1.7.16.1.3. username Copiar enlaceEnlace copiado en el portapapeles!
Returns the username of the user, html escaped.
1.7.16.1.4. account Copiar enlaceEnlace copiado en el portapapeles!
Returns the account of the user.
1.7.16.1.5. name Copiar enlaceEnlace copiado en el portapapeles!
Returns the first and surname of the user.
1.7.16.1.6. email Copiar enlaceEnlace copiado en el portapapeles!
Returns the email of the user.
1.7.16.1.7. password_required? Copiar enlaceEnlace copiado en el portapapeles!
This method will return true
for users using the builtin Developer Portal authentication mechanisms and false
for those that are authenticated via Janrain, CAS or other single-sign-on method.
{{ if user.password_required? }} {{ endif }}
{{ if user.password_required? }}
{{ endif }}
1.7.16.1.8. sections Copiar enlaceEnlace copiado en el portapapeles!
Returns the list of sections the user has access to.
1.7.16.1.9. role Copiar enlaceEnlace copiado en el portapapeles!
Returns the role of the user
1.7.16.1.10. roles_collection Copiar enlaceEnlace copiado en el portapapeles!
Retuns a list of available roles for the user
1.7.16.1.11. url Copiar enlaceEnlace copiado en el portapapeles!
Return the resource url of the user
{{ 'Delete' | delete_button: user.url }}
{{ 'Delete' | delete_button: user.url }}
1.7.16.1.12. edit_url Copiar enlaceEnlace copiado en el portapapeles!
Return the url to edit the user
{{ 'Edit' | link_to: user.edit_url, title: 'Edit', class: 'action edit' }}
{{ 'Edit' | link_to: user.edit_url, title: 'Edit', class: 'action edit' }}
1.7.16.1.13. can Copiar enlaceEnlace copiado en el portapapeles!
Exposes rights of current user which are dependent on your settings and user’s role. You can call these methods on the returned object:
- invite_user?
- create_application?
- see_log_requests?
{% if current_user.can.see_log_requests? and application.log_requests? %} (<a href="{{ application.log_requests_url }}" class="action edit">App Request Log</a>) {% endif %}
{% if current_user.can.see_log_requests? and application.log_requests? %}
(<a href="{{ application.log_requests_url }}" class="action edit">App Request Log</a>)
{% endif %}
1.7.16.1.14. extra_fields Copiar enlaceEnlace copiado en el portapapeles!
Returns non-hidden extra fields with values for this user Example: Print all extra fields
{% for field in user.extra_fields %} {{ field.label }}: {{ field.value }} {% endfor %}
{% for field in user.extra_fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
1.7.16.1.15. fields Copiar enlaceEnlace copiado en el portapapeles!
Returns all fields with values for this user Example: Print all fields
{% for field in user.fields %} {{ field.label }}: {{ field.value }} {% endfor %}
{% for field in user.fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
1.7.16.1.16. builtin_fields Copiar enlaceEnlace copiado en el portapapeles!
Returns all builtin fields with values for this user
1.7.17. Error drop (up) Copiar enlaceEnlace copiado en el portapapeles!
When a form fails to submit because of invalid data, the errors
array will be available on the related model.
1.7.17.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.17.1.1. attribute Copiar enlaceEnlace copiado en el portapapeles!
Returns attribute of the model to this error is related
{{ account.errors.org_name.first.attribute }} <!-- org_name -->
{{ account.errors.org_name.first.attribute }}
<!-- org_name -->
1.7.17.1.2. message Copiar enlaceEnlace copiado en el portapapeles!
Returns description of the error
{{ account.errors.first.message }} <!-- cannot be blank -->
{{ account.errors.first.message }}
<!-- cannot be blank -->
1.7.17.1.3. value Copiar enlaceEnlace copiado en el portapapeles!
Returns value of the attribute to which the error
is related
{{ account.errors.org_name.first.value }} <!-- => "ACME Co." -->
{{ account.errors.org_name.first.value }}
<!-- => "ACME Co." -->
1.7.17.1.4. to_str Copiar enlaceEnlace copiado en el portapapeles!
Returns full description of the error (includes the attribute name)
{{ model.errors.first }} <!-- => "Attribute can't be blank" -->
{{ model.errors.first }}
<!-- => "Attribute can't be blank" -->
1.7.18. Errors drop (up) Copiar enlaceEnlace copiado en el portapapeles!
Example: get all errors
{% for error in form.errors %} attribute: {{ error.attribute }} ... {% endfor %}
{% for error in form.errors %}
attribute: {{ error.attribute }}
...
{% endfor %}
1.7.18.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.18.1.1. empty? Copiar enlaceEnlace copiado en el portapapeles!
Returns true if there are no errors
{% if form.errors == empty %} Congratulations! You have no errors! {% endif %}
{% if form.errors == empty %}
Congratulations! You have no errors!
{% endif %}
1.7.18.1.2. present? Copiar enlaceEnlace copiado en el portapapeles!
Returns true if there are some errors
{% if form.errors == present %} Sorry, there were some errors. {% endif %}
{% if form.errors == present %}
Sorry, there were some errors.
{% endif %}
1.7.19. Feature drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.19.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.19.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ feature.errors.name | inline_errors }}
{{ feature.errors.name | inline_errors }}
1.7.19.1.2. name Copiar enlaceEnlace copiado en el portapapeles!
Returns the name of the feature
<h2>Feature {{ feature.name }}</h2>
<h2>Feature {{ feature.name }}</h2>
1.7.19.1.3. description Copiar enlaceEnlace copiado en el portapapeles!
Returns the description of the feature
1.7.19.1.4. has_description? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the feature has description
{% if feature.has_description? %} {{ feature.description }} {% else %} This feature has no description. {% endif %}
{% if feature.has_description? %}
{{ feature.description }}
{% else %}
This feature has no description.
{% endif %}
1.7.20. Field drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.20.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.20.1.1. value Copiar enlaceEnlace copiado en el portapapeles!
Returns value of the field
Name: {{ account.fields.first_name.value }}
Name: {{ account.fields.first_name.value }}
1.7.20.1.2. name Copiar enlaceEnlace copiado en el portapapeles!
Returns system name of the field
1.7.20.1.3. required Copiar enlaceEnlace copiado en el portapapeles!
1.7.20.1.6. visible? Copiar enlaceEnlace copiado en el portapapeles!
1.7.20.1.7. visible Copiar enlaceEnlace copiado en el portapapeles!
1.7.20.1.8. read_only Copiar enlaceEnlace copiado en el portapapeles!
1.7.20.1.9. errors Copiar enlaceEnlace copiado en el portapapeles!
1.7.20.1.10. input_name Copiar enlaceEnlace copiado en el portapapeles!
Returns name for the HTML input that is expected when the form is submitted.
<!-- the 'name' attribute will be 'account[country]' -->
<!-- the 'name' attribute will be 'account[country]' -->
1.7.20.1.11. html_id Copiar enlaceEnlace copiado en el portapapeles!
Returns a unique field identifier that is commonly used as HTML ID attribute.
{{ account.fields.country.html_id }} <!-- => 'account_country' -->
{{ account.fields.country.html_id }}
<!-- => 'account_country' -->
1.7.20.1.12. label Copiar enlaceEnlace copiado en el portapapeles!
Returns label of the field
{{ account.fields.country.label }} <!-- => 'Country' -->
{{ account.fields.country.label }}
<!-- => 'Country' -->
1.7.20.1.13. to_str Copiar enlaceEnlace copiado en el portapapeles!
Returns value of the field if used as variable
{{ account.fields.first_name }} => 'Tom'
{{ account.fields.first_name }} => 'Tom'
1.7.20.1.14. choices Copiar enlaceEnlace copiado en el portapapeles!
Returns array of choices available for that field, if any. For example for a field called fruit
it may respond with ['apple', 'bannana', 'orange']
.
You can define choices in the 3scale Admin Portal under Audience > Accounts > Settings > Fields Definitions. Each of the array elements responds to id
and label
which are usually just the same unless the field is a special builtin one (like country
). It is recommended to use those methods rather that output the choice
'as is' for future compatibility.
1.7.21. Flash drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.21.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.21.1.1. messages Copiar enlaceEnlace copiado en el portapapeles!
Return an array of messages
{% for message in flash.messages %} <p id="flash-{{ message.type }}"> {{ message.text }} </p> {% endfor %}
{% for message in flash.messages %}
<p id="flash-{{ message.type }}">
{{ message.text }}
</p>
{% endfor %}
1.7.22. Forum drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.22.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.22.1.1. enabled? Copiar enlaceEnlace copiado en el portapapeles!
Returns true
if you have forum functionality enabled.
{% if forum.enabled? %} <a href="/forum">Check out our forum!</a> {% endif %}
{% if forum.enabled? %}
<a href="/forum">Check out our forum!</a>
{% endif %}
1.7.22.1.2. latest_posts Copiar enlaceEnlace copiado en el portapapeles!
1.7.23. I18n drop (up) Copiar enlaceEnlace copiado en el portapapeles!
Provide useful strings for i18n support.
{{ object.some_date | date: i18n.long_date }}
{{ object.some_date | date: i18n.long_date }}
1.7.23.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.23.1.1. short_date Copiar enlaceEnlace copiado en el portapapeles!
Alias for %b %d
Dec 11
Dec 11
1.7.23.1.2. long_date Copiar enlaceEnlace copiado en el portapapeles!
Alias for %B %d, %Y
December 11, 2013
December 11, 2013
1.7.23.1.3. default_date Copiar enlaceEnlace copiado en el portapapeles!
Alias for %Y-%m-%d
2013-12-11
2013-12-11
1.7.24. Invitation drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.24.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.24.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ invitation.errors.name | inline_errors }}
{{ invitation.errors.name | inline_errors }}
1.7.24.1.2. email Copiar enlaceEnlace copiado en el portapapeles!
Returns email address
1.7.24.1.3. accepted? Copiar enlaceEnlace copiado en el portapapeles!
Returns true if the invitation was accepted
1.7.24.1.4. accepted_at Copiar enlaceEnlace copiado en el portapapeles!
Returns a date if the invitations was accepted
{{ invitation.accepted_at | date: i18n.short_date }}
{{ invitation.accepted_at | date: i18n.short_date }}
1.7.24.1.5. sent_at Copiar enlaceEnlace copiado en el portapapeles!
Returns the creation date
{{ invitation.sent_at | date: i18n.short_date }}
{{ invitation.sent_at | date: i18n.short_date }}
1.7.24.1.6. resend_url Copiar enlaceEnlace copiado en el portapapeles!
Returns the url for resend the invitation
{{ "Resend" | update_button: invitation.resend_url}}
{{ "Resend" | update_button: invitation.resend_url}}
1.7.24.1.7. url Copiar enlaceEnlace copiado en el portapapeles!
Returns the resource url
{{ "Delete" | delete_button: invitation.url }}
{{ "Delete" | delete_button: invitation.url }}
1.7.25. Invoice drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.25.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.25.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ invoice.errors.name | inline_errors }}
{{ invoice.errors.name | inline_errors }}
1.7.25.1.2. friendly_id Copiar enlaceEnlace copiado en el portapapeles!
Returns a friendly id
<td> {{ invoice.id }} </td> <td> {{ invoice.name }} </td> <td> {{ invoice.state }} </td> <td> {{ invoice.cost }} {{ invoice.currency }} </td>
<td> {{ invoice.id }} </td>
<td> {{ invoice.name }} </td>
<td> {{ invoice.state }} </td>
<td> {{ invoice.cost }} {{ invoice.currency }} </td>
1.7.25.1.3. name Copiar enlaceEnlace copiado en el portapapeles!
String composed by month and year
1.7.25.1.4. state Copiar enlaceEnlace copiado en el portapapeles!
1.7.25.1.5. cost Copiar enlaceEnlace copiado en el portapapeles!
Returns a number with two decimals
23.00
23.00
1.7.25.1.6. currency Copiar enlaceEnlace copiado en el portapapeles!
1.7.25.1.7. cost_without_vat Copiar enlaceEnlace copiado en el portapapeles!
Returns cost withot VAT
1.7.25.1.8. vat_amount Copiar enlaceEnlace copiado en el portapapeles!
Returns vat ammount
1.7.25.1.9. exists_pdf? Copiar enlaceEnlace copiado en el portapapeles!
Return true if the pdf was generated
1.7.25.1.10. period_begin Copiar enlaceEnlace copiado en el portapapeles!
{{ invoice.period_begin | date: i18n.short_date }}
{{ invoice.period_begin | date: i18n.short_date }}
1.7.25.1.11. period_end Copiar enlaceEnlace copiado en el portapapeles!
{{ invoice.period_end | date: i18n.long_date }}
{{ invoice.period_end | date: i18n.long_date }}
1.7.25.1.12. issued_on Copiar enlaceEnlace copiado en el portapapeles!
{{ invoice.issued_on | date: i18n.long_date }}
{{ invoice.issued_on | date: i18n.long_date }}
1.7.25.1.13. due_on Copiar enlaceEnlace copiado en el portapapeles!
{{ invoice.due_on | date: i18n.long_date }}
{{ invoice.due_on | date: i18n.long_date }}
1.7.25.1.14. paid_on Copiar enlaceEnlace copiado en el portapapeles!
{{ invoice.paid_on | date: i18n.long_date }}
{{ invoice.paid_on | date: i18n.long_date }}
1.7.25.1.15. vat_code Copiar enlaceEnlace copiado en el portapapeles!
1.7.25.1.16. fiscal_code Copiar enlaceEnlace copiado en el portapapeles!
1.7.25.1.17. account Copiar enlaceEnlace copiado en el portapapeles!
Return a AccountDrop
1.7.25.1.18. buyer_account Copiar enlaceEnlace copiado en el portapapeles!
1.7.25.1.19. line_items Copiar enlaceEnlace copiado en el portapapeles!
Returns a array of LineItemDrop
1.7.25.1.20. payment_transactions Copiar enlaceEnlace copiado en el portapapeles!
Returns a array of PaymentTransactionDrop
1.7.25.1.21. url Copiar enlaceEnlace copiado en el portapapeles!
Return the resource url of the invoice
{{ "Show" | link_to: invoice.url }}
{{ "Show" | link_to: invoice.url }}
1.7.25.1.22. pdf_url Copiar enlaceEnlace copiado en el portapapeles!
Return the resource url of the invoice pdf
{{ "PDF" | link_to: invoice.pdf_url }}
{{ "PDF" | link_to: invoice.pdf_url }}
1.7.26. Janrain drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.26.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.26.1.1. login_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.26.1.2. user_identified? Copiar enlaceEnlace copiado en el portapapeles!
1.7.26.1.3. session_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.26.1.4. relying_party Copiar enlaceEnlace copiado en el portapapeles!
1.7.27. LineItem drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.27.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.27.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ line_item.errors.name | inline_errors }}
{{ line_item.errors.name | inline_errors }}
1.7.27.1.2. name Copiar enlaceEnlace copiado en el portapapeles!
1.7.27.1.3. description Copiar enlaceEnlace copiado en el portapapeles!
1.7.27.1.4. quantity Copiar enlaceEnlace copiado en el portapapeles!
1.7.27.1.5. cost Copiar enlaceEnlace copiado en el portapapeles!
1.7.28. Message drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.28.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.28.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ message.errors.name | inline_errors }}
{{ message.errors.name | inline_errors }}
1.7.28.1.2. id Copiar enlaceEnlace copiado en el portapapeles!
Returns the id of the message
1.7.28.1.3. subject Copiar enlaceEnlace copiado en el portapapeles!
If subject is not present then either a truncated body or (no subject)
string is returned.
1.7.28.1.4. body Copiar enlaceEnlace copiado en el portapapeles!
Body of the message
1.7.28.1.5. created_at Copiar enlaceEnlace copiado en el portapapeles!
Returns the creation date
{{ message.created_at | date: i18n.short_date }}
{{ message.created_at | date: i18n.short_date }}
1.7.28.1.6. url Copiar enlaceEnlace copiado en el portapapeles!
URL of the message detail, points either to inbox or outbox.
1.7.28.1.7. state Copiar enlaceEnlace copiado en el portapapeles!
Either 'read' or 'unread'
1.7.28.1.8. sender Copiar enlaceEnlace copiado en el portapapeles!
Returns the name of the sender
1.7.28.1.9. to Copiar enlaceEnlace copiado en el portapapeles!
Returns the name of the receiver
1.7.28.1.10. recipients Copiar enlaceEnlace copiado en el portapapeles!
1.7.29. Message drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.29.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.29.1.1. type Copiar enlaceEnlace copiado en el portapapeles!
The possible types of the messages are:
- success (not used by now)
- info
- warning
- danger
1.7.29.1.2. text Copiar enlaceEnlace copiado en el portapapeles!
1.7.30. Metric drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.30.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.30.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ metric.errors.name | inline_errors }}
{{ metric.errors.name | inline_errors }}
1.7.30.1.2. unit Copiar enlaceEnlace copiado en el portapapeles!
Returns the unit of the metric
This metric is measured in {{ metric.unit | pluralize }}
This metric is measured in {{ metric.unit | pluralize }}
1.7.30.1.3. description Copiar enlaceEnlace copiado en el portapapeles!
Returns the description of the metric
1.7.30.1.4. name Copiar enlaceEnlace copiado en el portapapeles!
Returns the name of the metric
<h4>Metric {{ metric.name }}</h4> <p>{{ metric.description }}</p>
<h4>Metric {{ metric.name }}</h4>
<p>{{ metric.description }}</p>
1.7.30.1.5. system_name Copiar enlaceEnlace copiado en el portapapeles!
Returns the system name of this metric
<h4>Metric {{ metric.name }}</h4> <p>{{ metric.system_name }}</p>
<h4>Metric {{ metric.name }}</h4>
<p>{{ metric.system_name }}</p>
1.7.30.1.6. usage_limits Copiar enlaceEnlace copiado en el portapapeles!
Returns the usage limits of the metric
1.7.30.1.7. pricing_rules Copiar enlaceEnlace copiado en el portapapeles!
Returns the pricing rules of the metric
1.7.30.1.8. has_parent Copiar enlaceEnlace copiado en el portapapeles!
1.7.31. Page drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.31.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.31.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ page.errors.name | inline_errors }}
{{ page.errors.name | inline_errors }}
1.7.31.1.2. title Copiar enlaceEnlace copiado en el portapapeles!
Returns the title of the page
<title>{{ page.title }}</title>
<title>{{ page.title }}</title>
1.7.31.1.3. system_name Copiar enlaceEnlace copiado en el portapapeles!
Returns system name of the page
{% if page.system_name == 'my_page' %} {% include 'custom_header' %} {% endif %}
{% if page.system_name == 'my_page' %}
{% include 'custom_header' %}
{% endif %}
1.7.32. Page drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.32.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.32.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ page.errors.name | inline_errors }}
{{ page.errors.name | inline_errors }}
1.7.32.1.2. title Copiar enlaceEnlace copiado en el portapapeles!
1.7.32.1.3. kind Copiar enlaceEnlace copiado en el portapapeles!
1.7.32.1.4. url Copiar enlaceEnlace copiado en el portapapeles!
1.7.32.1.5. description Copiar enlaceEnlace copiado en el portapapeles!
1.7.33. Pagination drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.33.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.33.1.1. page_size Copiar enlaceEnlace copiado en el portapapeles!
Number of items on one full page.
1.7.33.1.2. current_page Copiar enlaceEnlace copiado en el portapapeles!
Number of the currently selected page.
1.7.33.1.3. current_offset Copiar enlaceEnlace copiado en el portapapeles!
Items skipped so far.
1.7.33.1.4. pages Copiar enlaceEnlace copiado en el portapapeles!
Total number of pages.
1.7.33.1.5. items Copiar enlaceEnlace copiado en el portapapeles!
Total number of items in all pages together.
1.7.33.1.6. previous Copiar enlaceEnlace copiado en el portapapeles!
Number of the previous page or empty.
1.7.33.1.7. next Copiar enlaceEnlace copiado en el portapapeles!
Number of the next page or empty.
1.7.33.1.8. parts Copiar enlaceEnlace copiado en el portapapeles!
Elements that help to render a user-friendly pagination. See the [[part-drop[part drop] for more information.
1.7.34. Part drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.34.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.34.1.1. url Copiar enlaceEnlace copiado en el portapapeles!
1.7.34.1.2. rel Copiar enlaceEnlace copiado en el portapapeles!
1.7.34.1.3. current? Copiar enlaceEnlace copiado en el portapapeles!
1.7.34.1.4. is_link Copiar enlaceEnlace copiado en el portapapeles!
1.7.34.1.5. title Copiar enlaceEnlace copiado en el portapapeles!
1.7.34.1.6. to_s Copiar enlaceEnlace copiado en el portapapeles!
1.7.35. PaymentGateway drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.35.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.35.1.1. braintree_blue? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether current payment gateway is braintreepayments.com
1.7.35.1.2. authorize_net? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether current payment gateway is authorize.Net
1.7.35.1.3. type Copiar enlaceEnlace copiado en el portapapeles!
Returns the type of this payment gateway.
1.7.36. PaymentTransaction drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.36.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.36.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ payment_transaction.errors.name | inline_errors }}
{{ payment_transaction.errors.name | inline_errors }}
1.7.36.1.2. currency Copiar enlaceEnlace copiado en el portapapeles!
Returns the currency
1.7.36.1.3. amount Copiar enlaceEnlace copiado en el portapapeles!
Returns the amount
1.7.36.1.4. created_at Copiar enlaceEnlace copiado en el portapapeles!
Returns the creation date
1.7.36.1.5. success? Copiar enlaceEnlace copiado en el portapapeles!
Returns true if was success
1.7.36.1.6. message Copiar enlaceEnlace copiado en el portapapeles!
Returns the message of the transaction
1.7.36.1.7. reference Copiar enlaceEnlace copiado en el portapapeles!
Returns the reference
1.7.37. PlanFeature drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.37.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.37.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ plan_feature.errors.name | inline_errors }}
{{ plan_feature.errors.name | inline_errors }}
1.7.37.1.2. name Copiar enlaceEnlace copiado en el portapapeles!
Returns the name of the feature
<h2>Feature {{ feature.name }}</h2>
<h2>Feature {{ feature.name }}</h2>
1.7.37.1.3. description Copiar enlaceEnlace copiado en el portapapeles!
Returns the description of the feature
1.7.37.1.4. has_description? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the feature has description
{% if feature.has_description? %} {{ feature.description }} {% else %} This feature has no description. {% endif %}
{% if feature.has_description? %}
{{ feature.description }}
{% else %}
This feature has no description.
{% endif %}
1.7.37.1.5. enabled? Copiar enlaceEnlace copiado en el portapapeles!
1.7.38. Post drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.38.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.38.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ post.errors.name | inline_errors }}
{{ post.errors.name | inline_errors }}
1.7.38.1.2. body Copiar enlaceEnlace copiado en el portapapeles!
Text of the post.
1.7.38.1.3. topic Copiar enlaceEnlace copiado en el portapapeles!
Every post belongs to a [[topic-drop[topic]
1.7.38.1.4. created_at Copiar enlaceEnlace copiado en el portapapeles!
Date when this post created
{{ post.created_at | date: i18n.short_date }}
{{ post.created_at | date: i18n.short_date }}
1.7.38.1.5. url Copiar enlaceEnlace copiado en el portapapeles!
The url of this post within its topic
1.7.39. Post drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.39.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.39.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ post.errors.name | inline_errors }}
{{ post.errors.name | inline_errors }}
1.7.39.1.2. title Copiar enlaceEnlace copiado en el portapapeles!
1.7.39.1.3. kind Copiar enlaceEnlace copiado en el portapapeles!
1.7.39.1.4. url Copiar enlaceEnlace copiado en el portapapeles!
1.7.39.1.5. description Copiar enlaceEnlace copiado en el portapapeles!
1.7.40. PricingRule drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.40.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.40.1.1. cost_per_unit Copiar enlaceEnlace copiado en el portapapeles!
Returns the cost per unit of the pricing rule Example: Using pricing rule drop in liquid
<h2>Pricing rule</h2> Min value {{ pricing_rule.min }} Max value {{ pricing_rule.max }} Cost per unit {{ pricing_rule.cost_per_unit }}
<h2>Pricing rule</h2>
Min value {{ pricing_rule.min }}
Max value {{ pricing_rule.max }}
Cost per unit {{ pricing_rule.cost_per_unit }}
1.7.40.1.2. min Copiar enlaceEnlace copiado en el portapapeles!
Returns the minimum value of the pricing rule
1.7.40.1.3. max Copiar enlaceEnlace copiado en el portapapeles!
Returns the maximum value of the pricing rule
1.7.40.1.4. plan Copiar enlaceEnlace copiado en el portapapeles!
Returns plan of pricing rule
1.7.41. Provider drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.41.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.41.1.1. name Copiar enlaceEnlace copiado en el portapapeles!
Returns the name of your organization.
1.7.41.1.2. payment_gateway Copiar enlaceEnlace copiado en el portapapeles!
Returns the payment gateway associated with your organization
1.7.41.1.3. domain Copiar enlaceEnlace copiado en el portapapeles!
Domain of your Developer Portal
1.7.41.1.4. timezone Copiar enlaceEnlace copiado en el portapapeles!
Returns the timezone that you use. You can change your timezone in the Admin Portal. Select Dashboard > Account Settings. In the Overview page, scroll down to Account Details, click Edit and modify the Time Zone field.
1.7.41.1.5. support_email Copiar enlaceEnlace copiado en el portapapeles!
Support email of the account
1.7.41.1.6. finance_support_email Copiar enlaceEnlace copiado en el portapapeles!
Finance support email of the account
1.7.41.1.7. telephone_number Copiar enlaceEnlace copiado en el portapapeles!
Returns the telephone number of the account
1.7.41.1.8. multiple_applications_allowed? Copiar enlaceEnlace copiado en el portapapeles!
True if developers can have more separate applications with their own keys, stats, and so on. This depends on your 3scale plan.
1.7.41.1.9. logo_url Copiar enlaceEnlace copiado en el portapapeles!
Return the logo url
1.7.41.1.10. multiple_services_allowed? Copiar enlaceEnlace copiado en el portapapeles!
True if your 3scale plan allows you to manage multiple APIs as separate services.
{% if provider.multiple_services_allowed? %} {% for service in provider.services %} Service {{ service.name }} is available. {% endfor %} {% endif %}
{% if provider.multiple_services_allowed? %}
{% for service in provider.services %}
Service {{ service.name }} is available.
{% endfor %}
{% endif %}
1.7.41.1.11. finance_allowed? Copiar enlaceEnlace copiado en el portapapeles!
1.7.41.1.12. multiple_users_allowed? Copiar enlaceEnlace copiado en el portapapeles!
True if the developer accounts can have multiple logins associated with them. This depends on your 3scale plan and if its visibility has been turned on for your Developer Portal in the Admin Portal under Audience > Developer Portal > Feature Visibility.
1.7.41.1.13. account_plans Copiar enlaceEnlace copiado en el portapapeles!
Returns all published account plans.
1.7.41.1.14. services Copiar enlaceEnlace copiado en el portapapeles!
Returns all defined services.
<p>You can signup to any of our services!</p> <ul> {% for service in provider.services %} <li>{{ service.name }} <a href="/signup/service/{{ service.system_name }}">Signup!</a></li> {% endfor %}
<p>You can signup to any of our services!</p>
<ul>
{% for service in provider.services %}
<li>{{ service.name }} <a href="/signup/service/{{ service.system_name }}">Signup!</a></li>
{% endfor %}
1.7.41.1.15. signups_enabled? Copiar enlaceEnlace copiado en el portapapeles!
You can enable or disable signups in the 3scale Admin Portal under Audience > Accounts > Settings > Usage Rules>.
1.7.41.1.16. account_management_enabled? Copiar enlaceEnlace copiado en el portapapeles!
You can enable or disable account management in the 3scale Admin Portal under Audience > Accounts > Settings > Usage Rules>.
1.7.42. ReferrerFilter drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.42.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.42.1.1. id Copiar enlaceEnlace copiado en el portapapeles!
1.7.42.1.2. value Copiar enlaceEnlace copiado en el portapapeles!
1.7.42.1.3. delete_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.42.1.4. application Copiar enlaceEnlace copiado en el portapapeles!
1.7.43. Request drop (up) Copiar enlaceEnlace copiado en el portapapeles!
Example: Using request drop in liquid
<h2>Request details</h2> URI {{ request.request_uri }} Host {{ request.host }} Host and port {{ request.host_with_port }}
<h2>Request details</h2>
URI {{ request.request_uri }}
Host {{ request.host }}
Host and port {{ request.host_with_port }}
1.7.43.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.43.1.1. request_uri Copiar enlaceEnlace copiado en el portapapeles!
Returns the URI of the request
1.7.43.1.2. host_with_port Copiar enlaceEnlace copiado en el portapapeles!
Returns the host with port of the request
1.7.43.1.3. host Copiar enlaceEnlace copiado en el portapapeles!
Returns the host part of the request URL
1.7.43.1.4. path Copiar enlaceEnlace copiado en el portapapeles!
Returns the path part of the request URL
{% if request.path == '/' %} Welcome on a landing page! {% else %} This just an ordinary page. {% endif %}
{% if request.path == '/' %}
Welcome on a landing page!
{% else %}
This just an ordinary page.
{% endif %}
1.7.44. Role drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.44.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.44.1.1. name Copiar enlaceEnlace copiado en el portapapeles!
Return internal name of the role, important for the system
1.7.44.1.2. description Copiar enlaceEnlace copiado en el portapapeles!
Return a descriptiptive text for the role
1.7.45. Search drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.45.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.45.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ search.errors.name | inline_errors }}
{{ search.errors.name | inline_errors }}
1.7.45.1.2. query Copiar enlaceEnlace copiado en el portapapeles!
Returns the searched string
1.7.45.1.3. total_found Copiar enlaceEnlace copiado en el portapapeles!
Returns the number of matching elements
1.7.45.1.4. results Copiar enlaceEnlace copiado en el portapapeles!
Returs an array of results for que search
1.7.46. Service drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.46.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.46.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ service.errors.name | inline_errors }}
{{ service.errors.name | inline_errors }}
1.7.46.1.2. name Copiar enlaceEnlace copiado en el portapapeles!
Returns the name of the service
1.7.46.1.3. system_name Copiar enlaceEnlace copiado en el portapapeles!
Returns the system name of the service
1.7.46.1.4. description Copiar enlaceEnlace copiado en el portapapeles!
Returns the description of the service
1.7.46.1.5. subscribed? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the service is subscribed
{% if service.subscribed? %} <p>You already subscribed this service.</p> {% endif %}
{% if service.subscribed? %}
<p>You already subscribed this service.</p>
{% endif %}
1.7.46.1.6. subscription Copiar enlaceEnlace copiado en el portapapeles!
Returns a subscription(ServiceContract
drop) if the currently logged in user is subscribed to this service, Nil otherwise.
1.7.46.1.7. subscribable? Copiar enlaceEnlace copiado en el portapapeles!
1.7.46.1.8. subscribe_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.46.1.9. application_plans Copiar enlaceEnlace copiado en el portapapeles!
Returns the published application plans of the service
1.7.46.1.10. service_plans Copiar enlaceEnlace copiado en el portapapeles!
Returns the published service plans of the service
1.7.46.1.11. plans Copiar enlaceEnlace copiado en el portapapeles!
Returns the application plans of the service
1.7.46.1.12. features Copiar enlaceEnlace copiado en el portapapeles!
Returns the visible features of the service
1.7.46.1.13. apps_identifier Copiar enlaceEnlace copiado en el portapapeles!
Depending on the authentication mode set, returns either 'ID', 'API key' or 'Client ID' for OAuth authentication.
{{ service.application_key_name }}
{{ service.application_key_name }}
1.7.46.1.14. backend_version Copiar enlaceEnlace copiado en el portapapeles!
1.7.46.1.15. referrer_filters_required? Copiar enlaceEnlace copiado en el portapapeles!
1.7.46.1.16. metrics Copiar enlaceEnlace copiado en el portapapeles!
Returns the metrics of the service
1.7.46.1.17. support_email Copiar enlaceEnlace copiado en el portapapeles!
Support email of the service
1.7.47. ServiceContract drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.47.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.47.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ service_contract.errors.name | inline_errors }}
{{ service_contract.errors.name | inline_errors }}
1.7.47.1.2. id Copiar enlaceEnlace copiado en el portapapeles!
1.7.47.1.3. can_change_plan? Copiar enlaceEnlace copiado en el portapapeles!
Returns true if any form of change is possible
1.7.47.1.4. trial? Copiar enlaceEnlace copiado en el portapapeles!
Returns true if the contract is still in the trial period.
Note: If you change the trial period length of a plan, it does not affect the existing contracts.
1.7.47.1.5. live? Copiar enlaceEnlace copiado en el portapapeles!
1.7.47.1.6. state Copiar enlaceEnlace copiado en el portapapeles!
There are three possible states:
- pending - live - suspended
- pending
- live
- suspended
1.7.47.1.7. remaining_trial_period_days Copiar enlaceEnlace copiado en el portapapeles!
Number of day still left in the trial period.
1.7.47.1.8. plan Copiar enlaceEnlace copiado en el portapapeles!
Returns the plan of the contract
1.7.47.1.9. plan_change_permission_name Copiar enlaceEnlace copiado en el portapapeles!
Returns name of the allowed action
1.7.47.1.10. plan_change_permission_warning Copiar enlaceEnlace copiado en el portapapeles!
Returns a warning messenger of the allowed action
1.7.47.1.11. contract Copiar enlaceEnlace copiado en el portapapeles!
1.7.47.1.12. name Copiar enlaceEnlace copiado en el portapapeles!
1.7.47.1.13. system_name Copiar enlaceEnlace copiado en el portapapeles!
1.7.47.1.14. change_plan_url Copiar enlaceEnlace copiado en el portapapeles!
1.7.47.1.15. service Copiar enlaceEnlace copiado en el portapapeles!
1.7.47.1.16. applications Copiar enlaceEnlace copiado en el portapapeles!
1.7.47.1.17. can Copiar enlaceEnlace copiado en el portapapeles!
Exposes specific rights of the current user for that subscription.
{% if subscription.can.change_plan? %} ... {% endif %}
{% if subscription.can.change_plan? %}
...
{% endif %}
1.7.48. ServicePlan drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.48.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.48.1.1. selected? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the plan is selected
{% if plan.selected? %} <p>You will signup to {{ plan.name }}</p> {% endif %}
{% if plan.selected? %}
<p>You will signup to {{ plan.name }}</p>
{% endif %}
1.7.48.1.2. bought? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the plan is bought
{% if plan.bought? %} <p>You are on this plan already!</p> {% endif %}
{% if plan.bought? %}
<p>You are on this plan already!</p>
{% endif %}
1.7.48.1.3. features Copiar enlaceEnlace copiado en el portapapeles!
Returns the visible features of the plan
{% if plan == my_free_plan %} <p>These plans are the same.</p> {% else %} <p>These plans are not the same.</p> {% endif %}
{% if plan == my_free_plan %}
<p>These plans are the same.</p>
{% else %}
<p>These plans are not the same.</p>
{% endif %}
1.7.48.1.4. setup_fee Copiar enlaceEnlace copiado en el portapapeles!
Returns the setup fee of the plan
1.7.48.1.5. name Copiar enlaceEnlace copiado en el portapapeles!
Returns the name of the plan
<h2>We offer you a new {{ plan.name }} plan!</h2>
<h2>We offer you a new {{ plan.name }} plan!</h2>
1.7.48.1.6. system_name Copiar enlaceEnlace copiado en el portapapeles!
Returns the system name of the plan
1.7.48.1.7. id Copiar enlaceEnlace copiado en el portapapeles!
Returns the plan id
1.7.48.1.8. free? Copiar enlaceEnlace copiado en el portapapeles!
The plan is free if it is not paid
. See the paid? method
1.7.48.1.9. paid? Copiar enlaceEnlace copiado en el portapapeles!
The plan is paid
when it has non-zero fixed or setup fee or there are some pricing rules present
{% if plan.paid? %} <p>this plan is a paid one.</p> {% else %} <p>this plan is a free one.</p> {% endif %}
{% if plan.paid? %}
<p>this plan is a paid one.</p>
{% else %}
<p>this plan is a free one.</p>
{% endif %}
1.7.48.1.10. approval_required? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the plan requires approval?
{% if plan.approval_required? %} <p>This plan requires approval.</p> {% endif %}
{% if plan.approval_required? %}
<p>This plan requires approval.</p>
{% endif %}
1.7.48.1.11. flat_cost Copiar enlaceEnlace copiado en el portapapeles!
Returns the monthly fixed fee of the plan
1.7.48.1.12. service Copiar enlaceEnlace copiado en el portapapeles!
Example: Using service plan drop in liquid
<p class="notice">The examples for plan drop apply here</p> Service of this plan {{ plan.service.name }}
<p class="notice">The examples for plan drop apply here</p>
Service of this plan {{ plan.service.name }}
1.7.49. TimeZone drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.49.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.49.1.1. full_name Copiar enlaceEnlace copiado en el portapapeles!
1.7.49.1.2. to_str Copiar enlaceEnlace copiado en el portapapeles!
1.7.50. Today drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.50.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.50.1.1. month Copiar enlaceEnlace copiado en el portapapeles!
Returns current month (1-12)
1.7.50.1.2. day Copiar enlaceEnlace copiado en el portapapeles!
Returns current day of the month (1-31)
1.7.50.1.3. year Copiar enlaceEnlace copiado en el portapapeles!
Returns current year Example: Create dynamic copyright
©{{ today.year }}
©{{ today.year }}
1.7.50.1.4. beginning_of_month Copiar enlaceEnlace copiado en el portapapeles!
Returns date of beginning of current month
This month began on {{ today.beginning_of_month | date: '%A' }}
This month began on {{ today.beginning_of_month | date: '%A' }}
1.7.51. Topic drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.51.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.51.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ topic.errors.name | inline_errors }}
{{ topic.errors.name | inline_errors }}
1.7.51.1.2. title Copiar enlaceEnlace copiado en el portapapeles!
1.7.51.1.3. kind Copiar enlaceEnlace copiado en el portapapeles!
1.7.51.1.4. url Copiar enlaceEnlace copiado en el portapapeles!
1.7.51.1.5. description Copiar enlaceEnlace copiado en el portapapeles!
1.7.52. Topic drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.52.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.52.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ topic.errors.name | inline_errors }}
{{ topic.errors.name | inline_errors }}
1.7.52.1.2. title Copiar enlaceEnlace copiado en el portapapeles!
Name of the topic. Submitted when first post to the thread is posted.
1.7.52.1.3. url Copiar enlaceEnlace copiado en el portapapeles!
1.7.53. Url drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.53.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.53.1.1. to_s Copiar enlaceEnlace copiado en el portapapeles!
1.7.53.1.2. to_str Copiar enlaceEnlace copiado en el portapapeles!
1.7.53.1.3. title Copiar enlaceEnlace copiado en el portapapeles!
1.7.53.1.4. current_or_subpath? Copiar enlaceEnlace copiado en el portapapeles!
True if the path of the current page is the same as the one for the URL or it is a direct subpath of it, that is, extended by ID. For example with {{ urls.outbox }}
these will return true:
- /admin/sent/messages/received
- /admin/sent/messages/received/42
But not these:
- /admin/sent/messsages/new
- /admin/sent/messsages/longer/subpath
See also '#active?', '#current?'.
1.7.53.1.5. current? Copiar enlaceEnlace copiado en el portapapeles!
True if the URL path is the the same as of the current. Parameters and other components are not taken into account. See also #active?'
1.7.53.1.6. active? Copiar enlaceEnlace copiado en el portapapeles!
True if the current page is in the same menu structure as this URL. See also #current?.
1.7.54. Urls drop (up) Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.1. provider Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.2. cas_login Copiar enlaceEnlace copiado en el portapapeles!
<a href="{{ urls.signup }}">signup here</a> <a href="{{ urls.service_subscription }}">subscribe to a service here</a>
<a href="{{ urls.signup }}">signup here</a>
<a href="{{ urls.service_subscription }}">subscribe to a service here</a>
1.7.54.1.3. new_application Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.4. signup Copiar enlaceEnlace copiado en el portapapeles!
URL of a signup page. Accessible for all.
<a href="{{ urls.signup }}?{{ service_plan | param_filter }}&{{ app_plan | param_filter }}" >Signup Now!</a>
<a href="{{ urls.signup }}?{{ service_plan | param_filter }}&{{ app_plan | param_filter }}" >Signup Now!</a>
1.7.54.1.5. search Copiar enlaceEnlace copiado en el portapapeles!
URL to which all the search requests should be sent
<form action="{{ urls.search }}" method="get"> </form>
<form action="{{ urls.search }}" method="get">
</form>
1.7.54.1.6. login Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.7. logout Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.8. forgot_password Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.9. service_subscription Copiar enlaceEnlace copiado en el portapapeles!
URL to a service subscription page. Only for logged in users.
<a href="{{ urls.service_subscription }}?{{ service_plan | param_filter }}" > Subscribe to service {{ service.name }} </a>
<a href="{{ urls.service_subscription }}?{{ service_plan | param_filter }}" >
Subscribe to service {{ service.name }}
</a>
1.7.54.1.10. compose_message Copiar enlaceEnlace copiado en el portapapeles!
URL to a page that allows the developer contact provider via the internal messaging system.
1.7.54.1.11. messages_outbox Copiar enlaceEnlace copiado en el portapapeles!
URL to the list of messages sent by a developer.
1.7.54.1.12. messages_trash Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.13. empty_messages_trash Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.14. credit_card_terms Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.15. credit_card_privacy Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.16. credit_card_refunds Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.17. users Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.18. personal_details Copiar enlaceEnlace copiado en el portapapeles!
URL or Nil if user account management is disabled. Check Usage Rules in the 3scale Admin Portal under Audience > Accounts > Settings > Usage Rules>.
1.7.54.1.19. access_details Copiar enlaceEnlace copiado en el portapapeles!
A page with API key(s) and other authentication info. Differs depending on the authentication strategy.
1.7.54.1.20. payment_details Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.21. new_invitation Copiar enlaceEnlace copiado en el portapapeles!
Page to invite new users
1.7.54.1.22. invitations Copiar enlaceEnlace copiado en el portapapeles!
List of all the sent invitations
1.7.54.1.23. dashboard Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.24. applications Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.25. api_access_details Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.26. services Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.27. messages_inbox Copiar enlaceEnlace copiado en el portapapeles!
URL to the list of received messages.
1.7.54.1.28. stats Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.29. account_overview Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.30. account_plans Copiar enlaceEnlace copiado en el portapapeles!
1.7.54.1.31. invoices Copiar enlaceEnlace copiado en el portapapeles!
1.7.55. UsageLimit drop (up) Copiar enlaceEnlace copiado en el portapapeles!
Example: Using usage limit drop in liquid
You cannot do more than {{ limit.value }} {{ limit.metric.unit }}s per {{ limit.period }}
You cannot do more than {{ limit.value }} {{ limit.metric.unit }}s per {{ limit.period }}
1.7.55.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.55.1.1. period Copiar enlaceEnlace copiado en el portapapeles!
Returns the period of the usage limit
1.7.55.1.2. metric Copiar enlaceEnlace copiado en el portapapeles!
Usually hits
but can be any custom method.
1.7.55.1.3. value Copiar enlaceEnlace copiado en el portapapeles!
Returns the value of the usage limit
1.7.56. User drop (up) Copiar enlaceEnlace copiado en el portapapeles!
<h2>User {{ user.display_name }}</h2> Account {{ user.account.name }} Username {{ user.username }} Email {{ user.email }} Website {{ user.website }}
<h2>User {{ user.display_name }}</h2>
Account {{ user.account.name }}
Username {{ user.username }}
Email {{ user.email }}
Website {{ user.website }}
1.7.56.1. Methods Copiar enlaceEnlace copiado en el portapapeles!
1.7.56.1.1. errors Copiar enlaceEnlace copiado en el portapapeles!
If a form of this model is rendered after an unsuccessful submit, this returns errors that occurred.
{{ user.errors.name | inline_errors }}
{{ user.errors.name | inline_errors }}
1.7.56.1.2. admin? Copiar enlaceEnlace copiado en el portapapeles!
Returns whether the user is an admin.
{% if user.admin? %} <p>You are an admin of your account.</p> {% endif %}
{% if user.admin? %}
<p>You are an admin of your account.</p>
{% endif %}
1.7.56.1.3. username Copiar enlaceEnlace copiado en el portapapeles!
Returns the username of the user, html escaped.
1.7.56.1.4. account Copiar enlaceEnlace copiado en el portapapeles!
Returns the account of the user.
1.7.56.1.5. name Copiar enlaceEnlace copiado en el portapapeles!
Returns the first and surname of the user.
1.7.56.1.6. email Copiar enlaceEnlace copiado en el portapapeles!
Returns the email of the user.
1.7.56.1.7. password_required? Copiar enlaceEnlace copiado en el portapapeles!
This method will return true
for users using the builtin Developer Portal authentication mechanisms and false
for those that are authenticated via Janrain, CAS or other single-sign-on method.
{% if user.password_required? %} {% endif %}
{% if user.password_required? %}
{% endif %}
1.7.56.1.8. sections Copiar enlaceEnlace copiado en el portapapeles!
Returns the list of sections the user has access to.
1.7.56.1.9. role Copiar enlaceEnlace copiado en el portapapeles!
Returns the role of the user
1.7.56.1.10. roles_collection Copiar enlaceEnlace copiado en el portapapeles!
Retuns a list of available roles for the user
1.7.56.1.11. url Copiar enlaceEnlace copiado en el portapapeles!
Return the resource url of the user
{{ 'Delete' | delete_button: user.url }}
{{ 'Delete' | delete_button: user.url }}
1.7.56.1.12. edit_url Copiar enlaceEnlace copiado en el portapapeles!
Return the url to edit the user
{{ 'Edit' | link_to: user.edit_url, title: 'Edit', class: 'action edit' }}
{{ 'Edit' | link_to: user.edit_url, title: 'Edit', class: 'action edit' }}
1.7.56.1.13. can Copiar enlaceEnlace copiado en el portapapeles!
Give access to permission methods
{% if user.can.be_managed? %} <!-- do something --> {% endif %}
{% if user.can.be_managed? %}
<!-- do something -->
{% endif %}
1.7.56.1.14. extra_fields Copiar enlaceEnlace copiado en el portapapeles!
Returns non-hidden extra fields with values for this user Example: Print all extra fields
{% for field in user.extra_fields %} {{ field.label }}: {{ field.value }} {% endfor %}
{% for field in user.extra_fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
1.7.56.1.15. fields Copiar enlaceEnlace copiado en el portapapeles!
Returns all fields with values for this user Example: Print all fields
{% for field in user.fields %} {{ field.label }}: {{ field.value }} {% endfor %}
{% for field in user.fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
1.7.56.1.16. builtin_fields Copiar enlaceEnlace copiado en el portapapeles!
Returns all builtin fields with values for this user
1.8. Tags (up) Copiar enlaceEnlace copiado en el portapapeles!
1.8.1. Tag 'braintree_customer_form' (up) Copiar enlaceEnlace copiado en el portapapeles!
Renders a form to enter data required for Braintree Blue payment gateway
1.8.2. Tag 'csrf' (up) Copiar enlaceEnlace copiado en el portapapeles!
Renders the cross site request forgery meta tags.
Example: Using csrf tag in liquid
<head> {% csrf %} </head>
<head>
{% csrf %}
</head>
1.8.3. Tag 'content' (up) Copiar enlaceEnlace copiado en el portapapeles!
Renders body of a page. Use this only inside a layout.
1.8.4. Tag 'content_for' (up) Copiar enlaceEnlace copiado en el portapapeles!
1.8.5. Tag 'debug' (up) Copiar enlaceEnlace copiado en el portapapeles!
Prints all liquid variables available in a template into an HTML comment.' We recommend to remove this tag from public templates.
`{% debug:help %}`
`{% debug:help %}`
1.8.6. Tag 'email' (up) Copiar enlaceEnlace copiado en el portapapeles!
The email
tag allows you to customize headers of your outgoing emails and is available only inside the email templates.
There are several convenience subtags such as cc
or subject
(see the table below) that simplify the job but you can also use a header
subtag to set an arbitrary SMTP header for the message.
Subtag | Description | Example |
subject | dynamic subject | {% subject = 'Greetings from Example company!' %} |
cc | carbon copy | {% cc = 'boss@example.com' %} |
bcc | blind carbon copy | {% bcc = 'all@example.com' %} |
from | the actual sender | {% from = 'system@example.com' %} |
reply-to | {% reply-to = 'support@example.com' %} | |
header | custom SMTP header | {% header 'X-SMTP-Group' = 'Important' %} |
do_not_send | discard the email | {% do_not_send %} |
Example: Conditional blind carbon copy
{% email %} {% if plan.system_name == 'enterprise' %} {% bcc 'marketing@world-domination.org' %} {% endif%} {% endemail %}
{% email %}
{% if plan.system_name == 'enterprise' %}
{% bcc 'marketing@world-domination.org' %}
{% endif%}
{% endemail %}
Example: Disabling emails at all
{% email %} {% do_not_send %} {% endemail %}
{% email %}
{% do_not_send %}
{% endemail %}
Example: Signup email filter
1.8.7. Tag 'flash' (up) Copiar enlaceEnlace copiado en el portapapeles!
Renders informational or error messages of the system.
DEPRECATED: This tag is deprecated, use FlashDrop instead.
Example: Using flash tag in liquid
{% flash %}
{% flash %}
1.8.9. Tag 'form' (up) Copiar enlaceEnlace copiado en el portapapeles!
Renders a form tag with an action and class attribute specified, depending on the name of the form. The supported forms are:
Form | Allowed Field Names | Spam Protection | Notes |
application.create |
| No | |
application.update |
| No | |
signup |
| Yes |
Sign Up directly to plans of your choice by adding one one or more hidden fields with a name |
Example: A form to create an application
1.8.10. Tag 'latest_forum_posts' (up) Copiar enlaceEnlace copiado en el portapapeles!
An HTML table with latest forum posts.
DEPRECATED: Use forum
drop instead.
Example: Using latest_forum_posts tag liquid
{% latest_forum_posts %}
{% latest_forum_posts %}
1.8.11. Tag 'latest_messages' (up) Copiar enlaceEnlace copiado en el portapapeles!
Renders a html snippet with the latest messages for the user.
Example: Using latest_messages tag liquid
{% latest_messages %}
{% latest_messages %}
1.8.12. Tag 'logo' (up) Copiar enlaceEnlace copiado en el portapapeles!
Renders the logo.
DEPRECATED: This tag is deprecated, use {{ provider.logo_url }} instead.
Example: Using menu tag in liquid
{% logo %}
{% logo %}
1.8.15. Tag 'plan_widget' (up) Copiar enlaceEnlace copiado en el portapapeles!
Includes a widget to review or change application plan
1.8.16. Tag 'portlet' (up) Copiar enlaceEnlace copiado en el portapapeles!
This tag includes portlet by system name.
1.8.18. Tag '3scale_essentials' (up) Copiar enlaceEnlace copiado en el portapapeles!
1.8.19. Tag 'user_widget' (up) Copiar enlaceEnlace copiado en el portapapeles!
Renders a user widget html snippet.
DEPRECATED: This tag is deprecated. Use a Developer Portal partial instead.
Example: Using user_widget tag in liquid
{% user_widget %} <p class="notice">If you are logged in you see profile related links above.</p> <p class="notice">If you are not login you are invited to login or signup.</p>
{% user_widget %}
<p class="notice">If you are logged in you see profile related links above.</p>
<p class="notice">If you are not login you are invited to login or signup.</p>
1.9. Filters (up) Copiar enlaceEnlace copiado en el portapapeles!
1.9.1. FormHelpers filters (up) Copiar enlaceEnlace copiado en el portapapeles!
1.9.1.1. error_class filter Copiar enlaceEnlace copiado en el portapapeles!
Outputs error class if argument is not empty Example: Using error_class to show output an error class
1.9.1.2. inline_errors filter Copiar enlaceEnlace copiado en el portapapeles!
Outputs error fields inline in paragraph Example: Using inline_errors to show errors inline
{{ form.errors.description | inline_errors }}
{{ form.errors.description | inline_errors }}
1.9.2. ParamFilter filters (up) Copiar enlaceEnlace copiado en el portapapeles!
1.9.2.1. to_param filter Copiar enlaceEnlace copiado en el portapapeles!
Converts a supplied drop to URL parameter if possible. Example: Using to_param filter in liquid
<h2>Signup to a service</h2> <a href="{{ urls.signup }}?{{ service | to_param }}">Signup to {{ service.name }}</a>
<h2>Signup to a service</h2>
<a href="{{ urls.signup }}?{{ service | to_param }}">Signup to {{ service.name }}</a>
1.9.3. Common filters (up) Copiar enlaceEnlace copiado en el portapapeles!
1.9.3.1. group_by filter Copiar enlaceEnlace copiado en el portapapeles!
Group collection by some key Example: Group applications by service
1.9.3.2. any filter Copiar enlaceEnlace copiado en el portapapeles!
True if any string in the collection equals to the parameter Example: Are there any pending applications of the current account?
{% assign has_pending_apps = current_account.applications | map: 'state' | any: 'live' %}
{% assign has_pending_apps = current_account.applications | map: 'state' | any: 'live' %}
1.9.3.3. stylesheet_link_tag filter Copiar enlaceEnlace copiado en el portapapeles!
Stylesheet link
1.9.3.4. javascript_include_tag filter Copiar enlaceEnlace copiado en el portapapeles!
Javascript include tag
1.9.3.5. image_tag filter Copiar enlaceEnlace copiado en el portapapeles!
Outputs an tag using the parameters as its src
attribute.
{{ 'http://example.com/cool.gif' | image_tag }} ## =>
{{ 'http://example.com/cool.gif' | image_tag }}
## =>
1.9.3.6. mail_to filter Copiar enlaceEnlace copiado en el portapapeles!
Converts email address to a 'mailto' link.
{{ 'me@there.is' | mail_to }} ## => <a href="mailto:me@there.is">me@there.is</a>
{{ 'me@there.is' | mail_to }}
## => <a href="mailto:me@there.is">me@there.is</a>
1.9.3.7. html_safe filter Copiar enlaceEnlace copiado en el portapapeles!
Marks content as HTML safe so that it is not escaped.
1.9.3.8. pluralize filter Copiar enlaceEnlace copiado en el portapapeles!
Convert word to plural form
1.9.3.9. delete_button filter Copiar enlaceEnlace copiado en el portapapeles!
Generates a button to delete a resource present on the URL. First parameter is a URL, second is a title. You can also add more HTML tag attributes as a third parameter.
{{ 'Delete Message' | delete_button: message.url, class: 'my-button' }}
{{ 'Delete Message' | delete_button: message.url, class: 'my-button' }}
1.9.3.10. delete_button_ajax filter Copiar enlaceEnlace copiado en el portapapeles!
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 }}
{{ 'Delete Message' | delete_button_ajax: message.url }}
1.9.3.11. update_button filter Copiar enlaceEnlace copiado en el portapapeles!
Generates a button to 'update' (HTTP PUT request) a resource present on the URL. First parameter is a URL, second is a title. You can also add more HTML tag attributes as a third parameter.
{{ 'Resend' | update_button: message.url, class: 'my-button' }}
{{ 'Resend' | update_button: message.url, class: 'my-button' }}
1.9.3.12. create_button filter Copiar enlaceEnlace copiado en el portapapeles!
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 Message' | create_button: message.url }}
1.9.3.13. create_button_ajax filter Copiar enlaceEnlace copiado en el portapapeles!
1.9.3.14. regenerate_oauth_secret_button filter Copiar enlaceEnlace copiado en el portapapeles!
1.9.3.15. link_to filter Copiar enlaceEnlace copiado en el portapapeles!
Create link from given text
{{ "See your App keys" | link_to:'/my-app-keys' }}
{{ "See your App keys" | link_to:'/my-app-keys' }}