Skip to content

Commit

Permalink
Rename Publish::PublishController to Publish::ApplicationController
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitemaeric committed Jan 10, 2025
1 parent 40ab2ed commit a8b3d7b
Show file tree
Hide file tree
Showing 56 changed files with 56 additions and 56 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module Publish
class PublishController < ApplicationController
class ApplicationController < ::ApplicationController
include SuccessMessage

layout 'publish'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Publish
module Courses
module ALevelRequirements
class ALevelRequirementsController < PublishController
class ALevelRequirementsController < ApplicationController
before_action :assign_course, :verify_teacher_degree_apprenticeship_course

def new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class AboutThisCourseController < PublishController
class AboutThisCourseController < ApplicationController
include GotoPreview
include CopyCourseContent

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class AccreditedProviderController < PublishController
class AccreditedProviderController < ApplicationController
include CourseBasicDetailConcern
before_action :build_course, only: %i[edit update]
before_action :build_course_params, only: :continue
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses/age_range_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class AgeRangeController < PublishController
class AgeRangeController < ApplicationController
include CourseBasicDetailConcern
decorates_assigned :course

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class ApplicationStatusController < PublishController
class ApplicationStatusController < ApplicationController
def new
course
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class ApplicationsOpenController < PublishController
class ApplicationsOpenController < ApplicationController
before_action :build_recruitment_cycle
before_action :build_course_params, only: %i[update continue]
include CourseBasicDetailConcern
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class BaseFundingTypeController < PublishController
class BaseFundingTypeController < ApplicationController
include SuccessMessage
include GotoPreview

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Publish
module Courses
module Degrees
class GradeController < PublishController
class GradeController < ApplicationController
include GotoPreview

def edit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Publish
module Courses
module Degrees
class StartController < PublishController
class StartController < ApplicationController
include GotoPreview

def edit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Publish
module Courses
module Degrees
class SubjectRequirementsController < PublishController
class SubjectRequirementsController < ApplicationController
include CopyCourseContent
include GotoPreview

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses/deletions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class DeletionsController < PublishController
class DeletionsController < ApplicationController
before_action :redirect_to_courses, if: -> { course&.is_published? }

def edit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class DraftRolloverController < PublishController
class DraftRolloverController < ApplicationController
before_action :redirect_to_courses, if: -> { course.is_published? }

def edit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class EngineersTeachPhysicsController < PublishController
class EngineersTeachPhysicsController < ApplicationController
decorates_assigned :course
include CourseBasicDetailConcern

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class FeesAndFinancialSupportController < PublishController
class FeesAndFinancialSupportController < ApplicationController
include CopyCourseContent
before_action :authorise_with_pundit

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses/funding_type_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class FundingTypeController < PublishController
class FundingTypeController < ApplicationController
include CourseBasicDetailConcern

def continue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class GcseRequirementsController < PublishController
class GcseRequirementsController < ApplicationController
include CopyCourseContent
include GotoPreview

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class InterviewProcessController < PublishController
class InterviewProcessController < ApplicationController
include CopyCourseContent
before_action :authorise_with_pundit

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses/length_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class LengthController < PublishController
class LengthController < ApplicationController
before_action :redirect_if_not_editable

def edit
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses/level_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class LevelController < PublishController
class LevelController < ApplicationController
include CourseBasicDetailConcern

private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class ModernLanguagesController < PublishController
class ModernLanguagesController < ApplicationController
decorates_assigned :course
before_action :build_course, only: %i[edit update]
before_action :build_course_params, only: [:continue]
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses/outcome_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class OutcomeController < PublishController
class OutcomeController < ApplicationController
include CourseBasicDetailConcern

def continue
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses/providers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class ProvidersController < PublishController
class ProvidersController < ApplicationController
include CourseBasicDetailConcern

before_action :build_course, only: %i[show]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class SchoolPlacementsController < PublishController
class SchoolPlacementsController < ApplicationController
include CopyCourseContent
include GotoPreview

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses/schools_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class SchoolsController < PublishController
class SchoolsController < ApplicationController
include CourseBasicDetailConcern

def continue
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses/start_date_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class StartDateController < PublishController
class StartDateController < ApplicationController
include CourseBasicDetailConcern

private
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses/study_mode_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class StudyModeController < PublishController
class StudyModeController < ApplicationController
include CourseBasicDetailConcern

def continue
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses/study_sites_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class StudySitesController < PublishController
class StudySitesController < ApplicationController
include CourseBasicDetailConcern

def continue
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses/subjects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class SubjectsController < PublishController
class SubjectsController < ApplicationController
decorates_assigned :course
before_action :build_course, only: %i[edit update]
before_action :build_course_params, :campaign_name_check, only: [:continue]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class TrainingWithDisabilitiesController < PublishController
class TrainingWithDisabilitiesController < ApplicationController
include CourseBasicDetailConcern
before_action :build_course, only: %i[show]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class VisaSponsorshipController < PublishController
class VisaSponsorshipController < ApplicationController
include CourseBasicDetailConcern

def new
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses/withdrawals_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Courses
class WithdrawalsController < PublishController
class WithdrawalsController < ApplicationController
before_action :redirect_to_courses, if: :course_withdrawn?
before_action :redirect_to_courses, unless: -> { course.is_published? }

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/courses_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module Publish
class CoursesController < PublishController
class CoursesController < ApplicationController
include ApplyRedirect

decorates_assigned :course
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/notifications_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module Publish
class NotificationsController < PublishController
class NotificationsController < ApplicationController
skip_before_action :check_interrupt_redirects
skip_before_action :authorize_provider

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Providers
class AccreditedProviderSearchController < PublishController
class AccreditedProviderSearchController < ApplicationController
helper_method :query, :search_result_title_component

def new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Publish
module Providers
module AccreditedProviders
class ChecksController < PublishController
class ChecksController < ApplicationController
def show
accredited_provider_form
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Providers
class AccreditedProvidersController < PublishController
class AccreditedProvidersController < ApplicationController
helper_method :accredited_provider_id

def index; end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/providers/contacts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Providers
class ContactsController < PublishController
class ContactsController < ApplicationController
def edit
authorize(provider, :edit?)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Providers
class SchoolPlacementsController < PublishController
class SchoolPlacementsController < ApplicationController
def edit
authorize(provider, :edit?)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Providers
class SchoolSearchController < PublishController
class SchoolSearchController < ApplicationController
helper_method :query, :search_result_title_component

before_action :authorize_provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Providers
class SchoolsCheckController < PublishController
class SchoolsCheckController < ApplicationController
before_action :new_form

def show; end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/publish/providers/schools_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Providers
class SchoolsController < PublishController
class SchoolsController < ApplicationController
before_action :site, only: %i[show delete]

def index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Providers
class SkilledWorkerVisaController < PublishController
class SkilledWorkerVisaController < ApplicationController
def edit
authorize(provider, :edit?)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Publish
module Providers
class StudentVisaController < PublishController
class StudentVisaController < ApplicationController
def edit
authorize(provider, :edit?)

Expand Down
Loading

0 comments on commit a8b3d7b

Please sign in to comment.