1.7.2. AccountPlan ドロップ (up)
例: Liquid の AccountPlan ドロップを使用する
<p class="notice">The examples for plan drop apply here</p>
1.7.2.1. メソッド
1.7.2.1.1. selected?
プランが選択されているかどうかを返します。
{% if plan.selected? %}
<p>You will signup to {{ plan.name }}</p>
{% endif %}1.7.2.1.2. bought?
プランが購入されているかどうかを返します。
{% if plan.bought? %}
<p>You are on this plan already!</p>
{% endif %}1.7.2.1.3. features
利用可能な機能の配列を返します。
1.7.2.1.4. setup_fee
開設費を返します。
1.7.2.1.5. name
プランの名前を返します。
<h2>We offer you a new {{ plan.name }} plan!</h2>1.7.2.1.6. system_name
プランのシステム名を返します。
{% for plan in available_plans %}
{% if plan.system_name == 'my_free_plan' %}
<p>You will buy our only free plan!</p>
{% endif %}
{% endfor %}1.7.2.1.7. id
プランの ID を返します。
1.7.2.1.8. free?
paid でない場合は、プランは無料です。paid? メソッドを参照してください。
{% if plan.free? %}
<p>This plan is free of charge.</p>
{% else %}
<p>Plan costs</p>
Setup fee {{ plan.setup_fee }}
Flat cost {{ plan.flat_cost }}
{% endif %}1.7.2.1.9. paid?
固定費または開設費がゼロではない場合や、何らかの課金ルールが設定されている場合、プランは paid です。
{% 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?
プランに承認が必要かどうかを返します。
{% if plan.approval_required? %}
<p>This plan requires approval.</p>
{% endif %}1.7.2.1.11. flat_cost
プランの月額固定費を返します。