style(rubocop): fix all safe auto correctable offenses

This commit is contained in:
Charlie Smurthwaite
2023-03-16 15:50:53 +00:00
parent 02c93a4850
commit fd289c46fd
204 changed files with 2611 additions and 2486 deletions
+5 -4
View File
@@ -1,4 +1,5 @@
class WebhooksController < ApplicationController
include WithinOrganization
before_action { @server = organization.servers.present.find_by_permalink!(params[:server_id]) }
before_action { params[:id] && @webhook = @server.webhooks.find_by_uuid!(params[:id]) }
@@ -8,7 +9,7 @@ class WebhooksController < ApplicationController
end
def new
@webhook = @server.webhooks.build(:all_events => true)
@webhook = @server.webhooks.build(all_events: true)
end
def create
@@ -16,7 +17,7 @@ class WebhooksController < ApplicationController
if @webhook.save
redirect_to_with_json [organization, @server, :webhooks]
else
render_form_errors 'new', @webhook
render_form_errors "new", @webhook
end
end
@@ -24,7 +25,7 @@ class WebhooksController < ApplicationController
if @webhook.update(safe_params)
redirect_to_with_json [organization, @server, :webhooks]
else
render_form_errors 'edit', @webhook
render_form_errors "edit", @webhook
end
end
@@ -45,7 +46,7 @@ class WebhooksController < ApplicationController
private
def safe_params
params.require(:webhook).permit(:name, :url, :all_events, :enabled, :events => [])
params.require(:webhook).permit(:name, :url, :all_events, :enabled, events: [])
end
end