Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit da674a0
Merge: c5a7789 b740b17
Author: Essem <[email protected]>
Date:   Tue Jan 28 21:30:13 2025 -0600

    Merge remote-tracking branch 'upstream/main'

commit b740b17
Author: wackbyte <[email protected]>
Date:   Tue Jan 28 20:22:19 2025 +0000

    Sync Glitch follow button with Mastodon (glitch-soc#2957)

    Fixes the follow button saying "Follow back" when it actually will
    cancel the follow request (mastodon#31934). Intentionally omits
    the "Mutual" state.

commit 6be5a8d
Merge: 43e1a24 353e5f7
Author: Claire <[email protected]>
Date:   Tue Jan 28 21:22:02 2025 +0100

    Merge pull request glitch-soc#2955 from ClearlyClaire/glitch-soc/merge-upstream

    Merge upstream changes up to 5b291fc

commit 353e5f7
Merge: e736363 5b291fc
Author: Claire <[email protected]>
Date:   Tue Jan 28 18:13:56 2025 +0100

    Merge commit '5b291fcbe41564264954618fb1f4086a3be1c600' into glitch-soc/merge-upstream

    Conflicts:
    - `app/validators/poll_options_validator.rb`:
      Upstream split `PollValidator` in two, and glitch-soc had local changes to
      make the options configurable.
      Refactored as upstream did, keeping glitch-soc's configurable limits.

commit 5b291fc
Author: Claire <[email protected]>
Date:   Tue Jan 28 15:44:27 2025 +0100

    Fix incorrect signature after HTTP redirect (mastodon#33757)

commit 32aa83e
Author: Claire <[email protected]>
Date:   Tue Jan 28 15:38:18 2025 +0100

    Fix polls not being validated on edition (mastodon#33755)

commit 80f72ee
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Tue Jan 28 10:40:50 2025 +0100

    New Crowdin Translations (automated) (mastodon#33753)

    Co-authored-by: GitHub Actions <[email protected]>

commit 0091459
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue Jan 28 09:39:50 2025 +0100

    Update RuboCop (non-major) to v1.71.0 (mastodon#33644)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 6646a0a
Author: Claire <[email protected]>
Date:   Tue Jan 28 09:21:59 2025 +0100

    Fix parameter validation in our custom devise strategies (mastodon#33754)

commit 8a2d764
Author: Matt Jankowski <[email protected]>
Date:   Tue Jan 28 03:08:16 2025 -0500

    Reduce factory creation across `controllers/admin` specs (mastodon#33752)

commit e736363
Author: Claire <[email protected]>
Date:   Mon Jan 27 17:24:41 2025 +0100

    [Glitch] Add hover cards to follow suggestions

    Port e973351 to glitch-soc

    Signed-off-by: Claire <[email protected]>

commit 560eaff
Author: Eugen Rochko <[email protected]>
Date:   Mon Jan 27 09:17:59 2025 +0100

    [Glitch] Remove system tooltip for alt text in web UI

    Port 9568733 to glitch-soc

    Signed-off-by: Claire <[email protected]>

commit a21f357
Author: Eugen Rochko <[email protected]>
Date:   Mon Jan 27 09:08:31 2025 +0100

    [Glitch] Fix color of language indicator in light theme in web UI

    Port 81271a1 to glitch-soc

    Signed-off-by: Claire <[email protected]>

commit 12bdf58
Author: Eugen Rochko <[email protected]>
Date:   Mon Jan 27 09:06:33 2025 +0100

    [Glitch] Refactor `<LanguageDropdown>` into TypeScript

    Port 52a5c8a to glitch-soc

    Signed-off-by: Claire <[email protected]>

commit 75e304d
Author: Claire <[email protected]>
Date:   Fri Jan 24 17:11:23 2025 +0100

    [Glitch] Convert `LanguageDropdownMenu` to functional component

    Port 9a0166c to glitch-soc

    Signed-off-by: Claire <[email protected]>

commit 17af994
Author: Eugen Rochko <[email protected]>
Date:   Thu Jan 23 14:01:11 2025 +0100

    [Glitch] Add information about alt text to alt text modal in web UI

    Port 0885c31 to glitch-soc

    Signed-off-by: Claire <[email protected]>

commit c14c553
Author: Claire <[email protected]>
Date:   Thu Jan 23 13:54:23 2025 +0100

    [Glitch] Convert `LanguageDropdown` to a functional component

    Port db14604 to glitch-soc

    Signed-off-by: Claire <[email protected]>

commit fcc5262
Merge: 43e1a24 93f3c72
Author: Claire <[email protected]>
Date:   Mon Jan 27 18:19:09 2025 +0100

    Merge commit '93f3c724aea4efe874054b2f546fff91f0bf731b' into glitch-soc/merge-upstream

    Conflicts:
    - `spec/system/settings/preferences/appearance_spec.rb`:
      Upstream tests for changing themes in there, but glitch-soc has
      its own place for that.
      Updated upstream's change while skipping the theme test.

commit 93f3c72
Author: Matt Jankowski <[email protected]>
Date:   Mon Jan 27 11:32:06 2025 -0500

    Use `expect` in remaining controller locations (mastodon#33748)

commit ea743d6
Author: Claire <[email protected]>
Date:   Mon Jan 27 17:30:18 2025 +0100

    Fix error in `TwoFactorPamAuthenticatable` when handling invalid params (mastodon#33746)

commit e973351
Author: Claire <[email protected]>
Date:   Mon Jan 27 17:24:41 2025 +0100

    Add hover cards to follow suggestions (mastodon#33749)

commit d3b637c
Author: Matt Jankowski <[email protected]>
Date:   Mon Jan 27 09:29:25 2025 -0500

    Use `expect` in `Admin::ExportControllerConcern` import params (mastodon#33745)

commit 65d9171
Author: Matt Jankowski <[email protected]>
Date:   Mon Jan 27 09:05:16 2025 -0500

    Use `expect` for `admin/` controllers (mastodon#33686)

commit 5938428
Author: Renaud Chaput <[email protected]>
Date:   Mon Jan 27 13:52:30 2025 +0100

    Add an optional metric exporter (mastodon#33734)

commit b868e30
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Jan 27 12:47:23 2025 +0000

    Update dependency @reduxjs/toolkit to v2.5.1 (mastodon#33739)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit df63470
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Jan 27 12:47:20 2025 +0000

    Update dependency ox to v2.14.21 (mastodon#33740)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit f8f3182
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Jan 27 13:46:11 2025 +0100

    Update formatjs monorepo (mastodon#33656)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit b53bf23
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Mon Jan 27 09:39:56 2025 +0100

    New Crowdin Translations (automated) (mastodon#33731)

    Co-authored-by: GitHub Actions <[email protected]>

commit 2bfcda1
Author: Mikkel Ricky <[email protected]>
Date:   Mon Jan 27 09:23:53 2025 +0100

    Fix documentation URL (mastodon#33728)

commit 9568733
Author: Eugen Rochko <[email protected]>
Date:   Mon Jan 27 09:17:59 2025 +0100

    Remove system tooltip for alt text in web UI (mastodon#33736)

commit 81271a1
Author: Eugen Rochko <[email protected]>
Date:   Mon Jan 27 09:08:31 2025 +0100

    Fix color of language indicator in light theme in web UI (mastodon#33724)

commit 52a5c8a
Author: Eugen Rochko <[email protected]>
Date:   Mon Jan 27 09:06:33 2025 +0100

    Refactor `<LanguageDropdown>` into TypeScript (mastodon#33723)

commit 2df86d6
Author: Eugen Rochko <[email protected]>
Date:   Fri Jan 24 23:20:05 2025 +0100

    Fix wrong styles on rules and buttons in the sign-up form (mastodon#33725)

commit 79cbb61
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Fri Jan 24 18:16:22 2025 +0100

    Update dependency react-select to v5.10.0 (mastodon#33722)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit f73df1f
Author: Matt Jankowski <[email protected]>
Date:   Fri Jan 24 11:57:55 2025 -0500

    Fix `Style/HashSlice` cop violations (mastodon#33720)

commit 469c8f8
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Fri Jan 24 17:49:48 2025 +0100

    Update babel monorepo to v7.26.7 (mastodon#33721)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 9a0166c
Author: Claire <[email protected]>
Date:   Fri Jan 24 17:11:23 2025 +0100

    Convert `LanguageDropdownMenu` to functional component (mastodon#33704)

commit a1d9c3f
Author: Matt Jankowski <[email protected]>
Date:   Fri Jan 24 09:40:20 2025 -0500

    Use `expect` params wrapper for more "auth" and "2FA" "controllers" (mastodon#33717)

commit e44b784
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Fri Jan 24 10:06:25 2025 +0100

    New Crowdin Translations (automated) (mastodon#33711)

    Co-authored-by: GitHub Actions <[email protected]>

commit 5c50d89
Author: Christian Schmidt <[email protected]>
Date:   Fri Jan 24 09:18:46 2025 +0100

    Store Bootsnap cache outside bind mounts (devcontainer only) (mastodon#33677)

commit 7261951
Author: Claire <[email protected]>
Date:   Thu Jan 23 18:56:33 2025 +0100

    Fix LDSignature tests (mastodon#33705)

commit 4b4de02
Author: Claire <[email protected]>
Date:   Thu Jan 23 15:34:30 2025 +0100

    Remove broken link to Terms of Service when none are defined (mastodon#33699)

commit ffaf458
Author: Claire <[email protected]>
Date:   Thu Jan 23 15:09:33 2025 +0100

    Change “Prohibited uses” section of ToS template according to feedback (mastodon#33703)

commit 1b2c952
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Thu Jan 23 13:36:03 2025 +0000

    New Crowdin Translations (automated) (mastodon#33697)

    Co-authored-by: GitHub Actions <[email protected]>

commit 51ecc73
Author: Matt Jankowski <[email protected]>
Date:   Thu Jan 23 08:35:19 2025 -0500

    Fix intermittent services/ap/process_status_update tags failure (mastodon#33695)

commit 0885c31
Author: Eugen Rochko <[email protected]>
Date:   Thu Jan 23 14:01:11 2025 +0100

    Add information about alt text to alt text modal in web UI (mastodon#33702)

commit db14604
Author: Claire <[email protected]>
Date:   Thu Jan 23 13:54:23 2025 +0100

    Convert `LanguageDropdown` to a functional component (mastodon#33701)
  • Loading branch information
bingxin666 committed Jan 29, 2025
1 parent 5523c4b commit 987556e
Show file tree
Hide file tree
Showing 228 changed files with 2,964 additions and 1,214 deletions.
1 change: 1 addition & 0 deletions .devcontainer/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
RAILS_ENV: development
NODE_ENV: development
BIND: 0.0.0.0
BOOTSNAP_CACHE_DIR: /tmp
REDIS_HOST: redis
REDIS_PORT: '6379'
DB_HOST: db
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.12

# This file is designed for production server deployment, not local development work
# For a containerized local dev environment, see: https://github.com/mastodon/mastodon/blob/main/README.md#docker
# For a containerized local dev environment, see: https://github.com/mastodon/mastodon/blob/main/docs/DEVELOPMENT.md#docker

# Please see https://docs.docker.com/engine/reference/builder for information about
# the extended buildx capabilities used in this file.
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ gem 'json-ld'
gem 'json-ld-preloaded', '~> 3.2'
gem 'rdf-normalize', '~> 0.5'

gem 'prometheus_exporter', '~> 2.2', require: false

gem 'opentelemetry-api', '~> 1.4.0'

group :opentelemetry do
Expand Down
13 changes: 8 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ GEM
marcel (~> 1.0.1)
mime-types
terrapin (>= 0.6.0, < 2.0)
language_server-protocol (3.17.0.3)
language_server-protocol (3.17.0.4)
launchy (3.0.1)
addressable (~> 2.8)
childprocess (~> 5.0)
Expand Down Expand Up @@ -557,7 +557,7 @@ GEM
opentelemetry-api (~> 1.0)
orm_adapter (0.5.0)
ostruct (0.6.1)
ox (2.14.20)
ox (2.14.21)
bigdecimal (>= 3.0)
parallel (1.26.3)
parser (3.3.7.0)
Expand All @@ -580,6 +580,8 @@ GEM
net-smtp
premailer (~> 1.7, >= 1.7.9)
prettyprint (0.2.0)
prometheus_exporter (2.2.0)
webrick
propshaft (1.1.0)
actionpack (>= 7.0.0)
activesupport (>= 7.0.0)
Expand Down Expand Up @@ -714,7 +716,7 @@ GEM
rspec-mocks (~> 3.0)
sidekiq (>= 5, < 8)
rspec-support (3.13.2)
rubocop (1.70.0)
rubocop (1.71.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -724,14 +726,14 @@ GEM
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.37.0)
rubocop-ast (1.38.0)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-performance (1.23.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.28.0)
rubocop-rails (2.29.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0)
Expand Down Expand Up @@ -984,6 +986,7 @@ DEPENDENCIES
pg (~> 1.5)
pghero
premailer-rails
prometheus_exporter (~> 2.2)
propshaft
public_suffix (~> 6.0)
puma (~> 6.3)
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/admin/account_actions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def set_account
end

def resource_params
params.require(:admin_account_action).permit(:type, :report_id, :warning_preset_id, :text, :send_email_notification, :include_statuses)
params
.expect(admin_account_action: [:type, :report_id, :warning_preset_id, :text, :send_email_notification, :include_statuses])
end
end
end
6 changes: 2 additions & 4 deletions app/controllers/admin/account_moderation_notes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ def destroy
private

def resource_params
params.require(:account_moderation_note).permit(
:content,
:target_account_id
)
params
.expect(account_moderation_note: [:content, :target_account_id])
end

def set_account_moderation_note
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/admin/accounts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ def filter_params
end

def form_account_batch_params
params.require(:form_account_batch).permit(:action, account_ids: [])
params
.expect(form_account_batch: [:action, account_ids: []])
end

def action_from_button
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/admin/announcements_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def filter_params
end

def resource_params
params.require(:announcement).permit(:text, :scheduled_at, :starts_at, :ends_at, :all_day)
params
.expect(announcement: [:text, :scheduled_at, :starts_at, :ends_at, :all_day])
end
end
5 changes: 2 additions & 3 deletions app/controllers/admin/change_emails_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ def require_local_account!
end

def resource_params
params.require(:user).permit(
:unconfirmed_email
)
params
.expect(user: [:unconfirmed_email])
end
end
end
6 changes: 4 additions & 2 deletions app/controllers/admin/custom_emojis_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def batch
private

def resource_params
params.require(:custom_emoji).permit(:shortcode, :image, :visible_in_picker)
params
.expect(custom_emoji: [:shortcode, :image, :visible_in_picker])
end

def filtered_custom_emojis
Expand Down Expand Up @@ -77,7 +78,8 @@ def action_from_button
end

def form_custom_emoji_batch_params
params.require(:form_custom_emoji_batch).permit(:action, :category_id, :category_name, custom_emoji_ids: [])
params
.expect(form_custom_emoji_batch: [:action, :category_id, :category_name, custom_emoji_ids: []])
end
end
end
3 changes: 2 additions & 1 deletion app/controllers/admin/domain_allows_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def set_domain_allow
end

def resource_params
params.require(:domain_allow).permit(:domain)
params
.expect(domain_allow: [:domain])
end
end
11 changes: 9 additions & 2 deletions app/controllers/admin/domain_blocks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ def batch
rescue Mastodon::NotPermittedError
flash[:alert] = I18n.t('admin.domain_blocks.not_permitted')
else
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
flash[:notice] = I18n.t('admin.domain_blocks.created_msg')
ensure
redirect_to admin_instances_path(limited: '1')
end

def new
Expand Down Expand Up @@ -114,7 +116,12 @@ def resource_params
end

def form_domain_block_batch_params
params.require(:form_domain_block_batch).permit(domain_blocks_attributes: [:enabled, :domain, :severity, :reject_media, :reject_reports, :private_comment, :public_comment, :obfuscate])
params
.expect(
form_domain_block_batch: [
domain_blocks_attributes: [[:enabled, :domain, :severity, :reject_media, :reject_reports, :private_comment, :public_comment, :obfuscate]],
]
)
end

def action_from_button
Expand Down
6 changes: 4 additions & 2 deletions app/controllers/admin/email_domain_blocks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ def set_resolved_records
end

def resource_params
params.require(:email_domain_block).permit(:domain, :allow_with_approval, other_domains: [])
params
.expect(email_domain_block: [:domain, :allow_with_approval, other_domains: []])
end

def form_email_domain_block_batch_params
params.require(:form_email_domain_block_batch).permit(email_domain_block_ids: [])
params
.expect(form_email_domain_block_batch: [email_domain_block_ids: []])
end

def action_from_button
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/admin/follow_recommendations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def follow_recommendation_filter
end

def form_account_batch_params
params.require(:form_account_batch).permit(:action, account_ids: [])
params
.expect(form_account_batch: [:action, account_ids: []])
end

def filter_params
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/admin/invites_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def deactivate_all
private

def resource_params
params.require(:invite).permit(:max_uses, :expires_in)
params
.expect(invite: [:max_uses, :expires_in])
end

def filtered_invites
Expand Down
6 changes: 4 additions & 2 deletions app/controllers/admin/ip_blocks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,17 @@ def batch
private

def resource_params
params.require(:ip_block).permit(:ip, :severity, :comment, :expires_in)
params
.expect(ip_block: [:ip, :severity, :comment, :expires_in])
end

def action_from_button
'delete' if params[:delete]
end

def form_ip_block_batch_params
params.require(:form_ip_block_batch).permit(ip_block_ids: [])
params
.expect(form_ip_block_batch: [ip_block_ids: []])
end
end
end
3 changes: 2 additions & 1 deletion app/controllers/admin/relays_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def set_relay
end

def resource_params
params.require(:relay).permit(:inbox_url)
params
.expect(relay: [:inbox_url])
end

def warn_signatures_not_enabled!
Expand Down
6 changes: 2 additions & 4 deletions app/controllers/admin/report_notes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ def after_create_redirect_path
end

def resource_params
params.require(:report_note).permit(
:content,
:report_id
)
params
.expect(report_note: [:content, :report_id])
end

def set_report_note
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/admin/roles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def set_role
end

def resource_params
params.require(:user_role).permit(:name, :color, :highlighted, :position, permissions_as_keys: [])
params
.expect(user_role: [:name, :color, :highlighted, :position, permissions_as_keys: []])
end
end
end
3 changes: 2 additions & 1 deletion app/controllers/admin/rules_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def set_rule
end

def resource_params
params.require(:rule).permit(:text, :hint, :priority)
params
.expect(rule: [:text, :hint, :priority])
end
end
end
3 changes: 2 additions & 1 deletion app/controllers/admin/settings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def after_update_redirect_path
end

def settings_params
params.require(:form_admin_settings).permit(*Form::AdminSettings::KEYS)
params
.expect(form_admin_settings: [*Form::AdminSettings::KEYS])
end
end
end
3 changes: 2 additions & 1 deletion app/controllers/admin/statuses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def batched_ordered_status_edits
helper_method :batched_ordered_status_edits

def admin_status_batch_action_params
params.require(:admin_status_batch_action).permit(status_ids: [])
params
.expect(admin_status_batch_action: [status_ids: []])
end

def after_create_redirect_path
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/admin/tags_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def set_tag
end

def tag_params
params.require(:tag).permit(:name, :display_name, :trendable, :usable, :listable)
params
.expect(tag: [:name, :display_name, :trendable, :usable, :listable])
end

def filtered_tags
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/admin/terms_of_service/drafts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def current_terms_of_service
end

def resource_params
params.require(:terms_of_service).permit(:text, :changelog)
params
.expect(terms_of_service: [:text, :changelog])
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def set_instance_presenter
end

def resource_params
params.require(:terms_of_service_generator).permit(*TermsOfService::Generator::VARIABLES)
params
.expect(terms_of_service_generator: [*TermsOfService::Generator::VARIABLES])
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def filter_params
end

def trends_preview_card_provider_batch_params
params.require(:trends_preview_card_provider_batch).permit(:action, preview_card_provider_ids: [])
params
.expect(trends_preview_card_provider_batch: [:action, preview_card_provider_ids: []])
end

def action_from_button
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/admin/trends/links_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def filter_params
end

def trends_preview_card_batch_params
params.require(:trends_preview_card_batch).permit(:action, preview_card_ids: [])
params
.expect(trends_preview_card_batch: [:action, preview_card_ids: []])
end

def action_from_button
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/admin/trends/statuses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def filter_params
end

def trends_status_batch_params
params.require(:trends_status_batch).permit(:action, status_ids: [])
params
.expect(trends_status_batch: [:action, status_ids: []])
end

def action_from_button
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/admin/trends/tags_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def filter_params
end

def trends_tag_batch_params
params.require(:trends_tag_batch).permit(:action, tag_ids: [])
params
.expect(trends_tag_batch: [:action, tag_ids: []])
end

def action_from_button
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/admin/users/roles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def set_user
end

def resource_params
params.require(:user).permit(:role_id)
params
.expect(user: [:role_id])
end
end
end
Loading

0 comments on commit 987556e

Please sign in to comment.