Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions app/controllers/errors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,4 @@ def internal_server_error
def maintenance
render "errors/maintenance", formats: :html
end

def deprecated
form = Form.find params.require(:form_id)
page = Page.find params.require(:page_id), params: { form_id: params.require(:form_id) }
redirect_to form_page_path(form_id: form.id, form_slug: form.form_slug, page_slug: page.id, mode: :form)
end
end
5 changes: 1 addition & 4 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@
config.active_support.disallowed_deprecation = :raise

# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = [
"/forms/:id endpoint",
"/forms/:id/pages endpoint",
]
config.active_support.disallowed_deprecation_warnings = []

# Highlight code that enqueued background job in logs.
config.active_job.verbose_enqueue_logs = true
Expand Down
9 changes: 2 additions & 7 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,8 @@
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true

# Log disallowed deprecations.
config.active_support.report_deprecations = true
config.active_support.deprecation = :silence
config.active_support.disallowed_deprecation = :log
config.active_support.disallowed_deprecation_warnings = [
/API v2/,
]
# Don't log any deprecations.
config.active_support.report_deprecations = false

# Enable DNS rebinding protection and other `Host` header attacks.
# config.hosts = [
Expand Down
5 changes: 1 addition & 4 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@
config.active_support.disallowed_deprecation = :raise

# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = [
"/forms/:id endpoint",
"/forms/:id/pages endpoint",
]
config.active_support.disallowed_deprecation_warnings = []

# Raises error for missing translations.
config.i18n.raise_on_missing_translations = true
Expand Down
1 change: 0 additions & 1 deletion config/initializers/forms_api_deprecations.rb

This file was deleted.

1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,5 @@
get "/maintenance" => "errors#maintenance", as: :maintenance_page
get "/404", to: "errors#not_found", as: :error_404, via: :all
get "/500", to: "errors#internal_server_error", as: :error_500, via: :all
get "/deprecated", to: "errors#deprecated"
match "*path", to: "errors#not_found", via: :all
end
Loading