Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address Deprecation Warnings #3449

Merged
merged 2 commits into from
Sep 5, 2024
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: 3 additions & 3 deletions app/models/condition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
class Condition < ApplicationRecord
belongs_to :question
enum action_type: %i[remove add_webhook]
serialize :option_list, Array
serialize :remove_data, Array
serialize :webhook_data, JSON
serialize :option_list, type: Array
serialize :remove_data, type: Array
serialize :webhook_data, coder: JSON

# Sort order: Number ASC
default_scope { order(number: :asc) }
Expand Down
2 changes: 1 addition & 1 deletion app/models/org.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Org < ApplicationRecord
# The links are validated against custom validator allocated at
# validators/template_links_validator.rb
attribute :links, :text, default: { org: [] }
serialize :links, JSON
serialize :links, coder: JSON

# ================
# = Associations =
Expand Down
2 changes: 1 addition & 1 deletion app/models/pref.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class Pref < ApplicationRecord
##
# Serialize prefs to JSON
serialize :settings, JSON
serialize :settings, coder: JSON

# ================
# = Associations =
Expand Down
2 changes: 1 addition & 1 deletion app/models/stat_created_plan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# Object that represents a Nbr of Plans created usage statistic
class StatCreatedPlan < Stat
serialize :details, JSON
serialize :details, coder: JSON

def by_template
parse_details.fetch('by_template', [])
Expand Down
2 changes: 1 addition & 1 deletion app/models/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Template < ApplicationRecord
# The links is validated against custom validator allocated at
# validators/template_links_validator.rb
attribute :links, :text, default: { funder: [], sample_plan: [] }
serialize :links, JSON
serialize :links, coder: JSON

attribute :published, :boolean, default: false
attribute :archived, :boolean, default: false
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class User < ApplicationRecord

##
# User Notification Preferences
serialize :prefs, Hash
serialize :prefs, type: Hash

# default user language to the default language
attribute :language_id, :integer, default: -> { Language.default&.id }
Expand Down
2 changes: 1 addition & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
config.action_controller.perform_caching = false

# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false
config.action_dispatch.show_exceptions = :none

# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
Expand Down
Loading