Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Pacify rubocop

Mir Bhatia41da6f60d464
diff --git a/modules/meeting/app/controllers/meetings_controller.rb b/modules/meeting/app/controllers/meetings_controller.rb
index a0d9bf1c3c8..17bf15f6519 100644
--- a/modules/meeting/app/controllers/meetings_controller.rb
+++ b/modules/meeting/app/controllers/meetings_controller.rb
@@ -486,10 +486,9 @@ class MeetingsController < ApplicationController
def meeting_params
if params[:meeting].present?
params
- .require(:meeting)
- .permit(:title, :location, :start_time, :project_id,
- :duration, :start_date, :start_time_hour, :notify,
- participants_attributes: %i[email name invited attended user user_id meeting id])
+ .expect(meeting: [:title, :location, :start_time, :project_id,
+ :duration, :start_date, :start_time_hour, :notify,
+ { participants_attributes: %i[email name invited attended user user_id meeting id] }])
end
end
@@ -556,7 +555,7 @@ class MeetingsController < ApplicationController
end
def timezone_params
- @timezone_params ||= params.require(:meeting).permit(:start_date, :start_time_hour).compact_blank
+ @timezone_params ||= params.expect(meeting: %i[start_date start_time_hour]).compact_blank
end
def export_pdf
diff --git a/modules/meeting/app/controllers/recurring_meetings_controller.rb b/modules/meeting/app/controllers/recurring_meetings_controller.rb
index 314a62187c0..150e5014297 100644
--- a/modules/meeting/app/controllers/recurring_meetings_controller.rb
+++ b/modules/meeting/app/controllers/recurring_meetings_controller.rb
@@ -328,9 +328,8 @@ class RecurringMeetingsController < ApplicationController
def recurring_meeting_params
params
- .require(:meeting)
- .permit(:project_id, :title, :location, :start_time_hour, :duration, :start_date,
- :interval, :frequency, :end_after, :end_date, :iterations, :notify)
+ .expect(meeting: %i[project_id title location start_time_hour duration start_date
+ interval frequency end_after end_date iterations notify])
end
def find_copy_from_meeting