diff options
author | spag <spag@golwen.net> | 2013-01-28 10:11:39 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-01-28 10:11:39 +0100 |
commit | 7f751576ae36f387bafa63e900fa21353a2ce3fb (patch) | |
tree | b6e939c80cecc9e74832a4dcb4cdab6b29f7d20e /app | |
parent | 29ac1a26b5d78c3d8570928df73610de0a361297 (diff) |
sip_registration model added
Diffstat (limited to 'app')
-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 |