Sha256: 9058de44ef7ec5a0820047bfef077dddb6c7277079e9b6031e2cb00d4130b031
Contents?: true
Size: 507 Bytes
Versions: 16
Compression:
Stored size: 507 Bytes
Contents
module PaidUp # Plan-FeatureSetting Relationship class 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 setting == PaidUp::Unlimited.to_i(:db) && (self.setting = PaidUp::Unlimited) end end end
Version data entries
16 entries across 16 versions & 1 rubygems