Sha256: 2c1bebb278eea4577b591c1aa29ecb65272c98b66491698c0484e5441377caa2

Contents?: true

Size: 423 Bytes

Versions: 15

Compression:

Stored size: 423 Bytes

Contents

class PaidUp::PlanFeatureSetting < ActiveRecord::Base
  belongs_to :plan, class_name: 'PaidUp::Plan', foreign_key: 'paid_up_plan_id', inverse_of: :plan_feature_settings
  validates_presence_of :setting, :plan, :feature

  after_initialize :catch_unlimited_in_setting

  private
    def catch_unlimited_in_setting
      if setting == PaidUp::Unlimited.to_i(:db)
        self.setting = PaidUp::Unlimited
      end
    end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
paid_up-0.9.13 app/models/paid_up/plan_feature_setting.rb
paid_up-0.9.12 app/models/paid_up/plan_feature_setting.rb
paid_up-0.9.11 app/models/paid_up/plan_feature_setting.rb
paid_up-0.9.10 app/models/paid_up/plan_feature_setting.rb
paid_up-0.9.9 app/models/paid_up/plan_feature_setting.rb
paid_up-0.9.8 app/models/paid_up/plan_feature_setting.rb
paid_up-0.9.7 app/models/paid_up/plan_feature_setting.rb
paid_up-0.9.6 app/models/paid_up/plan_feature_setting.rb
paid_up-0.9.5 app/models/paid_up/plan_feature_setting.rb
paid_up-0.9.4 app/models/paid_up/plan_feature_setting.rb
paid_up-0.9.3 app/models/paid_up/plan_feature_setting.rb
paid_up-0.9.2 app/models/paid_up/plan_feature_setting.rb
paid_up-0.9.1 app/models/paid_up/plan_feature_setting.rb
paid_up-0.9.0 app/models/paid_up/plan_feature_setting.rb
paid_up-0.8.1 app/models/paid_up/plan_feature_setting.rb