summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2017-03-08 21:19:00 +0100
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2017-03-08 21:19:00 +0100
commit9dcf637963216e81277764815ca3703c45cdf059 (patch)
tree7dc0bcb854a6768da9962a1d5fb6fc47e3db5b15
parentda4625e91302901a40d460a625fd598b5ae56b18 (diff)
downloadecs-9dcf637963216e81277764815ca3703c45cdf059.tar.gz
ecs-9dcf637963216e81277764815ca3703c45cdf059.zip
Delete json/rails module (obsolete in Rails 4).
-rw-r--r--app/controllers/application_controller.rb25
-rw-r--r--app/controllers/events_controller.rb2
-rw-r--r--app/controllers/memberships_controller.rb2
3 files changed, 12 insertions, 17 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 6c3e6bd..131b504 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,17 +1,17 @@
# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de).
-#
+#
# This file is part of ECS.
-#
+#
# ECS is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
-#
+#
# ECS is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Affero General Public License for more details.
-#
+#
# You should have received a copy of the GNU Affero General Public
# License along with ECS. If not, see <http://www.gnu.org/licenses/>.
@@ -24,7 +24,6 @@ class ApplicationController < ActionController::Base
require 'exceptions'
require 'pp'
- require 'json/add/rails'
#rescue_from Exception, :with => :rescue_body_500
rescue_from Ecs::InvalidMessageException, :with => :rescue_body_400
@@ -141,19 +140,19 @@ protected
# set the cookie header
def add_cookie_header
- case
+ case
when @participant.anonymous?
cookies[:ecs_anonymous] = \
{
- :value => @cookie,
- :path => "/",
+ :value => @cookie,
+ :path => "/",
:expires => Participant::TTL.seconds.from_now
}
when @participant.subparticipant?
cookies[:ecs_subparticipant] = \
{
- :value => @cookie,
- :path => "/",
+ :value => @cookie,
+ :path => "/",
:expires => Subparticipant::TTL.seconds.from_now
}
end
@@ -168,7 +167,7 @@ protected
raise Ecs::AuthenticationException, "Anonymous participants not allowed."
end
end
-
+
def block_subparticipants
if @participant.subparticipant
raise Ecs::AuthenticationException, "Subparticipants not allowed."
@@ -200,7 +199,7 @@ protected
logger.error $!.to_s
render :text => "#{$!.to_s}\n" , :layout => false, :status => 400
end
-
+
def rescue_body_403
@http_error= $!
logger.error $!.to_s
@@ -222,7 +221,7 @@ protected
logger.error $!.to_s
render :text => "#{$!.to_s}\n" , :layout => false, :status => 409
end
-
+
def rescue_body_415(controller_binding)
@http_error= $!
logger.error $!.to_s
diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb
index 1e8ec1d..c151f6b 100644
--- a/app/controllers/events_controller.rb
+++ b/app/controllers/events_controller.rb
@@ -18,8 +18,6 @@
class EventsController < ApplicationController
- require 'json/add/rails'
-
before_filter :authentication
before_filter :add_cookie_header # only for anonymous participants
diff --git a/app/controllers/memberships_controller.rb b/app/controllers/memberships_controller.rb
index dbd60ca..fa73ae0 100644
--- a/app/controllers/memberships_controller.rb
+++ b/app/controllers/memberships_controller.rb
@@ -18,8 +18,6 @@
class MembershipsController < ApplicationController
- require 'json/add/rails'
-
before_filter :authentication
before_filter :add_cookie_header # only for anonymous participants