From 69f4c4dc26b1cdf9b6dce1702fe35be46db3b55c Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 28 Apr 2019 02:15:39 +0300 Subject: [PATCH] before_filter -> before_action --- app/controllers/api/event_types_controller.rb | 2 +- app/controllers/api/events_controller.rb | 2 +- app/controllers/api/halls_controller.rb | 2 +- app/controllers/api/slots_controller.rb | 2 +- app/controllers/api/speakers_controller.rb | 2 +- app/controllers/api/tracks_controller.rb | 2 +- app/controllers/application_controller.rb | 2 +- app/controllers/public/application_controller.rb | 2 +- app/controllers/public/events_controller.rb | 2 +- app/controllers/public/personal_profiles_controller.rb | 2 +- app/controllers/public/volunteerships_controller.rb | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/controllers/api/event_types_controller.rb b/app/controllers/api/event_types_controller.rb index a49fa3b..1df244f 100644 --- a/app/controllers/api/event_types_controller.rb +++ b/app/controllers/api/event_types_controller.rb @@ -1,7 +1,7 @@ class Api::EventTypesController < Api::ApplicationController include ::CurrentConferenceAssigning include ::PublicApiExposing - before_filter :require_current_conference! + before_action :require_current_conference! def index @event_types = current_conference.event_types.includes(:translations) diff --git a/app/controllers/api/events_controller.rb b/app/controllers/api/events_controller.rb index a390c72..deaee7d 100644 --- a/app/controllers/api/events_controller.rb +++ b/app/controllers/api/events_controller.rb @@ -1,7 +1,7 @@ class Api::EventsController < Api::ApplicationController include ::CurrentConferenceAssigning include ::PublicApiExposing - before_filter :require_current_conference! + before_action :require_current_conference! def index @events = current_conference.events.approved.joins(:proposition).includes(:participations) diff --git a/app/controllers/api/halls_controller.rb b/app/controllers/api/halls_controller.rb index c449b2d..e90cabd 100644 --- a/app/controllers/api/halls_controller.rb +++ b/app/controllers/api/halls_controller.rb @@ -1,7 +1,7 @@ class Api::HallsController < Api::ApplicationController include ::CurrentConferenceAssigning include ::PublicApiExposing - before_filter :require_current_conference! + before_action :require_current_conference! def index @halls = current_conference.halls diff --git a/app/controllers/api/slots_controller.rb b/app/controllers/api/slots_controller.rb index 60cf154..4378f83 100644 --- a/app/controllers/api/slots_controller.rb +++ b/app/controllers/api/slots_controller.rb @@ -1,7 +1,7 @@ class Api::SlotsController < Api::ApplicationController include ::CurrentConferenceAssigning include ::PublicApiExposing - before_filter :require_current_conference! + before_action :require_current_conference! def index @slots = current_conference.slots diff --git a/app/controllers/api/speakers_controller.rb b/app/controllers/api/speakers_controller.rb index cd8cfc5..825653e 100644 --- a/app/controllers/api/speakers_controller.rb +++ b/app/controllers/api/speakers_controller.rb @@ -1,7 +1,7 @@ class Api::SpeakersController < Api::ApplicationController include ::CurrentConferenceAssigning include ::PublicApiExposing - before_filter :require_current_conference! + before_action :require_current_conference! def index @speakers = PersonalProfile.joins(user: {participations: {event: :proposition}}).where(events: {id: current_conference.approved_events.pluck(:id)}, conference: current_conference).distinct diff --git a/app/controllers/api/tracks_controller.rb b/app/controllers/api/tracks_controller.rb index 87f8ccf..fd4ae1a 100644 --- a/app/controllers/api/tracks_controller.rb +++ b/app/controllers/api/tracks_controller.rb @@ -1,7 +1,7 @@ class Api::TracksController < Api::ApplicationController include ::CurrentConferenceAssigning include ::PublicApiExposing - before_filter :require_current_conference! + before_action :require_current_conference! def index @tracks = current_conference.tracks.includes(:translations) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 5d5e932..a6f23b9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception - before_filter :configure_permitted_parameters, if: :devise_controller? + before_action :configure_permitted_parameters, if: :devise_controller? before_action :set_locale before_action :set_view_paths diff --git a/app/controllers/public/application_controller.rb b/app/controllers/public/application_controller.rb index 47e7e3f..cf0c9f5 100644 --- a/app/controllers/public/application_controller.rb +++ b/app/controllers/public/application_controller.rb @@ -1,7 +1,7 @@ module Public class ApplicationController < ::ApplicationController include ::CurrentConferenceAssigning - before_filter :require_current_conference! + before_action :require_current_conference! def current_conference @current_conference ||= Conference.order(created_at: :desc).find_by(host_name: request.host) diff --git a/app/controllers/public/events_controller.rb b/app/controllers/public/events_controller.rb index 375db09..fc24a94 100644 --- a/app/controllers/public/events_controller.rb +++ b/app/controllers/public/events_controller.rb @@ -1,6 +1,6 @@ module Public class EventsController < Public::ApplicationController - before_filter :authenticate_user! + before_action :authenticate_user! def index @events = Event.joins(:conference, :proposition, :participations).where(conference: current_conference).where('propositions.proposer_id = ? OR participations.participant_id = ?', current_user.id, current_user.id) diff --git a/app/controllers/public/personal_profiles_controller.rb b/app/controllers/public/personal_profiles_controller.rb index 4904fd0..6c5c85b 100644 --- a/app/controllers/public/personal_profiles_controller.rb +++ b/app/controllers/public/personal_profiles_controller.rb @@ -1,6 +1,6 @@ module Public class PersonalProfilesController < Public::ApplicationController - before_filter :authenticate_user! + before_action :authenticate_user! def create @profile = current_user.build_personal_profile(current_conference, profile_params) diff --git a/app/controllers/public/volunteerships_controller.rb b/app/controllers/public/volunteerships_controller.rb index efe28c3..119e09e 100644 --- a/app/controllers/public/volunteerships_controller.rb +++ b/app/controllers/public/volunteerships_controller.rb @@ -1,6 +1,6 @@ module Public class VolunteershipsController < Public::ApplicationController - before_filter :authenticate_user!, only: [:create, :destroy] + before_action :authenticate_user!, only: [:create, :destroy] def index @volunteer_teams = current_conference.volunteer_teams