summaryrefslogtreecommitdiff
path: root/app/models/dial_in_number_store.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/dial_in_number_store.rb')
-rw-r--r--app/models/dial_in_number_store.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/models/dial_in_number_store.rb b/app/models/dial_in_number_store.rb
new file mode 100644
index 0000000..17c2202
--- /dev/null
+++ b/app/models/dial_in_number_store.rb
@@ -0,0 +1,16 @@
+class DialInNumberStore < ActiveRecord::Base
+ # Associations and Validations
+ #
+ validates_presence_of :dial_in_number_storeable_type
+ validates_presence_of :dial_in_number_storeable_id
+
+ belongs_to :dial_in_number_storeable, :polymorphic => true
+
+ validates_presence_of :dial_in_number_storeable
+
+ has_many :phone_numbers, :as => :phone_numberable, :dependent => :destroy
+
+ # Delegations:
+ #
+ delegate :tenant, :to => :dial_in_number_storeable, :allow_nil => true
+end