Sha256: 2984d5005f84ba86c1af7ecfc3fe90f5c7e1c5fb66d47049e509c47c3badeab1

Contents?: true

Size: 385 Bytes

Versions: 14

Compression:

Stored size: 385 Bytes

Contents

class PaidUp::FeaturesPlan < ActiveRecord::Base
  belongs_to :plan, class_name: 'PaidUp::Plan'
  belongs_to :feature, class_name: 'PaidUp::Feature'
  validates_presence_of :setting

  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

14 entries across 14 versions & 1 rubygems

Version Path
paid_up-0.2.4 app/models/paid_up/features_plan.rb
paid_up-0.2.3 app/models/paid_up/features_plan.rb
paid_up-0.2.2 app/models/paid_up/features_plan.rb
paid_up-0.2.1 app/models/paid_up/features_plan.rb
paid_up-0.2.0 app/models/paid_up/features_plan.rb
paid_up-0.1.9 app/models/paid_up/features_plan.rb
paid_up-0.1.8 app/models/paid_up/features_plan.rb
paid_up-0.1.7 app/models/paid_up/features_plan.rb
paid_up-0.1.6 app/models/paid_up/features_plan.rb
paid_up-0.1.5 app/models/paid_up/features_plan.rb
paid_up-0.1.4 app/models/paid_up/features_plan.rb
paid_up-0.1.3 app/models/paid_up/features_plan.rb
paid_up-0.1.1 app/models/paid_up/features_plan.rb
paid_up-0.1.0 app/models/paid_up/features_plan.rb