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

Fix rails 7 and redmine 6.0.0 compatibility #836

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion app/models/repository_git_extra.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
class RepositoryGitExtra < ActiveRecord::Base
include Redmine::SafeAttributes

include Redmine::I18n
SMART_HTTP_OPTIONS = [[l(:label_disabled), '0'],
[l(:label_http_only), '3'],
[l(:label_https_only), '1'],
Expand Down Expand Up @@ -33,7 +34,7 @@ class RepositoryGitExtra < ActiveRecord::Base
validate :validate_urls_order

## Serializations
serialize :urls_order, Array
serialize :urls_order, type: Array

## Callbacks
before_save :check_urls_order_consistency
Expand Down
2 changes: 1 addition & 1 deletion app/models/repository_post_receive_url.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class RepositoryPostReceiveUrl < ActiveRecord::Base
validates :mode, presence: true, inclusion: { in: %i[github get post] }

## Serializations
serialize :triggers, Array
serialize :triggers, type: Array

## Scopes
scope :active, -> { where active: true }
Expand Down
2 changes: 1 addition & 1 deletion app/models/repository_protected_branche.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class RepositoryProtectedBranche < ActiveRecord::Base
class RepositoryProtectedBranche < (defined?(ApplicationRecord) == 'constant' ? ApplicationRecord : ActiveRecord::Base)
include Redmine::SafeAttributes
VALID_PERMS = ['RW+', 'RW', 'R', '-'].freeze
DEFAULT_PERM = 'RW+'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class RepositoryProtectedBrancheWrapped < RepositoryProtectedBranche
serialize :user_list, Array
serialize :user_list, type: Array
end

class MigrateProtectedBranchesUsers < ActiveRecord::Migration[4.2]
Expand Down
Loading