before_filter -> before_action
This commit is contained in:
parent
a7c9c83e02
commit
69f4c4dc26
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue