Sha256: d7b5113616699770394c90d022789f7036f6929dcb6cbacfa3b60e9f85e58e07

Contents?: true

Size: 355 Bytes

Versions: 9

Compression:

Stored size: 355 Bytes

Contents

class PaidUp::PlanFeatureSetting < ActiveRecord::Base
  belongs_to :plan, class_name: 'PaidUp::Plan'
  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

9 entries across 9 versions & 1 rubygems

Version Path
paid_up-0.5.3 app/models/paid_up/plan_feature_setting.rb
paid_up-0.5.2 app/models/paid_up/plan_feature_setting.rb
paid_up-0.5.1 app/models/paid_up/plan_feature_setting.rb
paid_up-0.5.0 app/models/paid_up/plan_feature_setting.rb
paid_up-0.4.4 app/models/paid_up/plan_feature_setting.rb
paid_up-0.4.3 app/models/paid_up/plan_feature_setting.rb
paid_up-0.4.2 app/models/paid_up/plan_feature_setting.rb
paid_up-0.4.1 app/models/paid_up/plan_feature_setting.rb
paid_up-0.4.0 app/models/paid_up/plan_feature_setting.rb