def admin_options
      if !user_is_allowed('variants', 'edit')
        render :json => false
        return
      end
      
      options = []
      case params[:field]                
        when 'subscription-interval'
          options = [
            { 'value' => Variant::SUBSCRIPTION_INTERVAL_MONTHLY , 'text' => 'Monthly' },
            { 'value' => Variant::SUBSCRIPTION_INTERVAL_YEARLY  , 'text' => 'Yearly'  }
          ]                      
        when 'subscription-prorate-method'
          options = [
            { 'value' => Variant::SUBSCRIPTION_PRORATE_METHOD_FLAT       , 'text' => 'Flat Amount'            },
            { 'value' => Variant::SUBSCRIPTION_PRORATE_METHOD_PERCENTAGE , 'text' => 'Percentage of Interval' },
            { 'value' => Variant::SUBSCRIPTION_PRORATE_METHOD_CUSTOM     , 'text' => 'Custom'                 }
          ]
        when 'subscription-start-day'
          options = (1..31).collect{ |i| { 'value' => i, 'text' => i }}            
        when 'subscription-start-month'    
          options = (1..12).collect{ |i| { 'value' => i, 'text' => Date.new(2000, i, 1).strftime('%B') }}
        when 'status'
          options = [
            { 'value' => Variant::STATUS_ACTIVE   , 'text' => 'Active'   },
            { 'value' => Variant::STATUS_INACTIVE , 'text' => 'Inactive' },
            { 'value' => Variant::STATUS_DELETED  , 'text' => 'Deleted'  }
          ]
      end
      render :json => options
    end
def admin_options
      if !user_is_allowed('variants', 'edit')
        render :json => false
        return
      end
      
      options = []
      case params[:field]                
        when 'subscription-interval'
          options = [
            { 'value' => Variant::SUBSCRIPTION_INTERVAL_MONTHLY , 'text' => 'Monthly' },
            { 'value' => Variant::SUBSCRIPTION_INTERVAL_YEARLY  , 'text' => 'Yearly'  }
          ]                      
        when 'subscription-prorate-method'
          options = [
            { 'value' => Variant::SUBSCRIPTION_PRORATE_METHOD_FLAT       , 'text' => 'Flat Amount'            },
            { 'value' => Variant::SUBSCRIPTION_PRORATE_METHOD_PERCENTAGE , 'text' => 'Percentage of Interval' },
            { 'value' => Variant::SUBSCRIPTION_PRORATE_METHOD_CUSTOM     , 'text' => 'Custom'                 }
          ]
        when 'subscription-start-day'
          options = (1..31).collect{ |i| { 'value' => i, 'text' => i }}            
        when 'subscription-start-month'    
          options = (1..12).collect{ |i| { 'value' => i, 'text' => Date.new(2000, i, 1).strftime('%B') }}
        when 'status'
          options = [
            { 'value' => Variant::STATUS_ACTIVE   , 'text' => 'Active'   },
            { 'value' => Variant::STATUS_INACTIVE , 'text' => 'Inactive' },
            { 'value' => Variant::STATUS_DELETED  , 'text' => 'Deleted'  }
          ]
      end
      render :json => options
    end
===========================================================================
 Option methods
===========================================================================
 @route_priority 1
 @route GET /admin/variants/:field-options