diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-28 11:09:39 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-28 11:09:39 +0100 |
commit | bcdd0a3584f23438257619ee4081949c1e653c91 (patch) | |
tree | 3dbdf93b00b39ab77ff520fe68f05847d59e46bb /app/models/sip_registration.rb | |
parent | cdde455a50df5de70ee3d84ce66733e8769db05f (diff) | |
parent | 553115fd50ef3c35d961fa98abfd593386da5c94 (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.rb | 21 |
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 |