1.7.6. ApplicationPlan ドロップ (up)
1.7.6.1. メソッド
1.7.6.1.1. selected?
プランが選択されているかどうかを返します。
{% if plan.selected? %}
<p>You will signup to {{ plan.name }}</p>
{% endif %}1.7.6.1.2. bought?
プランが購入されているかどうかを返します。
{% if plan.bought? %}
<p>You are on this plan already!</p>
{% endif %}1.7.6.1.3. features
プランの表示される機能を返します。
{% 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
プランの開設費を返します。
1.7.6.1.5. name
プランの名前を返します。
<h2>We offer you a new {{ plan.name }} plan!</h2>1.7.6.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.6.1.7. id
プランの ID を返します。
1.7.6.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.6.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.6.1.10. approval_required?
プランに承認が必要かどうかを返します。
{% if plan.approval_required? %}
<p>This plan requires approval.</p>
{% endif %}1.7.6.1.11. flat_cost
プランの月額固定費を返します。
1.7.6.1.12. metrics
プランのメトリクスを返します。
1.7.6.1.13. usage_limits
プランの使用限度を返します。
1.7.6.1.14. サービス
プランのサービスを返します。