diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-02-15 14:49:16 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-02-15 14:49:16 +0100 |
commit | 3d11d0a3a047a12bfd40b61252e269cabac76225 (patch) | |
tree | c16baf628633205b2e664f86f2e0038f3ee3b097 /app/models/sim_card.rb | |
parent | 124a421b19e08447fa790b65cc969dadd7408539 (diff) |
Basic structure for sim_cards and sim_card_providers.
Diffstat (limited to 'app/models/sim_card.rb')
-rw-r--r-- | app/models/sim_card.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/models/sim_card.rb b/app/models/sim_card.rb new file mode 100644 index 0000000..2cbf76b --- /dev/null +++ b/app/models/sim_card.rb @@ -0,0 +1,25 @@ +class SimCard < ActiveRecord::Base + attr_accessible :auto_order_card, :sip_account_id, :auth_key, :sim_number + + # Validations + # + validates :sim_card_provider_id, + :presence => true + + belongs_to :sim_card_provider, :touch => true + + validates :sim_card_provider, + :presence => true + + validates :sip_account_id, + :presence => true + + belongs_to :sip_account + + validates :sip_account, + :presence => true + + validates :sim_number, + :presence => true + +end |