diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-04-03 22:10:32 +0200 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-04-03 22:10:32 +0200 |
commit | 4ebbcf3b5576cc342086e2f54950a119a49f2bf9 (patch) | |
tree | e216a9634c31047e8908a882aed9ff2545ed99e6 /app/controllers/api/v1/sip_accounts_controller.rb | |
parent | edf06bf6f7d4f20d5a9145a5bbf8db409fe6ab1b (diff) | |
parent | cea2cc3c1cc1e48fc4600c698d52dfda2bde4505 (diff) |
Merge branch 'emberjs' into develop
Diffstat (limited to 'app/controllers/api/v1/sip_accounts_controller.rb')
-rw-r--r-- | app/controllers/api/v1/sip_accounts_controller.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/controllers/api/v1/sip_accounts_controller.rb b/app/controllers/api/v1/sip_accounts_controller.rb new file mode 100644 index 0000000..6f305a4 --- /dev/null +++ b/app/controllers/api/v1/sip_accounts_controller.rb @@ -0,0 +1,23 @@ +module Api + module V1 + class SipAccountsController < ApplicationController + respond_to :json + + def index + if params[:ids] + @sip_accounts = SipAccount.where(:id => params[:ids]) + else + @sip_accounts = SipAccount.all + end + + respond_with @sip_accounts + end + + def show + @sip_account = SipAccount.find(params[:id]) + + respond_with @sip_account + end + end + end +end |