summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-04 15:25:25 +0200
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-04 15:25:25 +0200
commit7a5a635a93e0803569d1107d2a64cfaa081d6743 (patch)
treed9dd11b26a7740915c86aac19c70c00ebb71e05f
parent87cf6e55f76901c340ec99cf216637a2b9672cc2 (diff)
skip_before_filter :verify_authenticity_token
-rw-r--r--app/controllers/api/v1/pager_groups_controller.rb25
1 files changed, 16 insertions, 9 deletions
diff --git a/app/controllers/api/v1/pager_groups_controller.rb b/app/controllers/api/v1/pager_groups_controller.rb
index 6db9b90..468a6aa 100644
--- a/app/controllers/api/v1/pager_groups_controller.rb
+++ b/app/controllers/api/v1/pager_groups_controller.rb
@@ -3,6 +3,8 @@ module Api
class PagerGroupsController < ApplicationController
respond_to :json
+ skip_before_filter :verify_authenticity_token
+
def index
# if params[:ids]
# @sip_accounts = SipAccount.where(:id => params[:ids])
@@ -20,7 +22,6 @@ module Api
respond_with @pager_group
end
-
def new
if params[:sip_account_id] && SipAccount.find(params[:sip_account_id])
@pager_group = SipAccount.find(params[:sip_account_id]).pager_groups.new
@@ -33,14 +34,20 @@ module Api
end
- def create
- @pager_group = PagerGroup.new(params[:pager_group])
- if @pager_group.save
- redirect_to @pager_group, :notice => t('pager_groups.controller.successfuly_created')
- else
- render :new
- end
- end
+ # def create
+ # @pager_group = PagerGroup.new(params[:pager_group])
+ # if @pager_group.save
+ # redirect_to @pager_group, :notice => t('pager_groups.controller.successfuly_created')
+ # else
+ # render :new
+ # end
+ # end
+
+ def destroy
+ @pager_group = PagerGroup.find(params[:id])
+ @pager_group.destroy
+ respond_with nil
+ end
end
end