summaryrefslogtreecommitdiff
path: root/app/models/sip_registration.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-28 11:09:39 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-28 11:09:39 +0100
commitbcdd0a3584f23438257619ee4081949c1e653c91 (patch)
tree3dbdf93b00b39ab77ff520fe68f05847d59e46bb /app/models/sip_registration.rb
parentcdde455a50df5de70ee3d84ce66733e8769db05f (diff)
parent553115fd50ef3c35d961fa98abfd593386da5c94 (diff)
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'app/models/sip_registration.rb')
-rw-r--r--app/models/sip_registration.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/app/models/sip_registration.rb b/app/models/sip_registration.rb
new file mode 100644
index 0000000..b668301
--- /dev/null
+++ b/app/models/sip_registration.rb
@@ -0,0 +1,21 @@
+class SipRegistration < ActiveRecord::Base
+ # Makes sure that this is a readonly model.
+ def readonly?
+ return true
+ end
+
+ # Prevent objects from being destroyed
+ def before_destroy
+ raise ActiveRecord::ReadOnlyRecord
+ end
+
+ # Prevent objects from being deleted
+ def self.delete_all
+ raise ActiveRecord::ReadOnlyRecord
+ end
+
+ # Prevent objects from being deleted
+ def delete
+ raise ActiveRecord::ReadOnlyRecord
+ end
+end