Sha256: 8984c76cea9a71c2e632ccf528822248c0d59663f3f14fe0ff21e3d1b70a2a08

Contents?: true

Size: 349 Bytes

Versions: 1

Compression:

Stored size: 349 Bytes

Contents

class PaidUp::FeaturesPlan < 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

1 entries across 1 versions & 1 rubygems

Version Path
paid_up-0.3.0 app/models/paid_up/features_plan.rb