Skip to content

Commit

Permalink
better ApplicationRecord detection for redmine 6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermeindl committed Jun 12, 2024
1 parent 72d0da6 commit d5fefe5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/messenger_setting.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class MessengerSetting < Rails.version < '7.1' ? ActiveRecord::Base : ApplicationRecord
class MessengerSetting < (defined?(ApplicationRecord) == 'constant' ? ApplicationRecord : ActiveRecord::Base)
belongs_to :project

validates :messenger_url, format: { with: URI::DEFAULT_PARSER.make_regexp(%w[http https]), allow_blank: true }
Expand Down

0 comments on commit d5fefe5

Please sign in to comment.