Avoid warnings during initialization
These warnings appear in the logs in the development environment, and, with Rails 7, the application will crash. When running the tests, they would appear in the standard error ouput if we set `config.cache_classes = false` in the test environment but, since that isn't the case, they don't. To reproduce these warnings (or the lack of them), start a Rails console in development and check the log/development.log file.
This commit is contained in:
@@ -7,6 +7,12 @@ ActsAsTaggableOn.setup do |config|
|
||||
# config.base_class = "ApplicationRecord"
|
||||
end
|
||||
|
||||
Rails.application.reloader.to_prepare do
|
||||
ActsAsTaggableOn::Tag.class_eval do
|
||||
include Graphqlable
|
||||
end
|
||||
end
|
||||
|
||||
module ActsAsTaggableOn
|
||||
Tagging.class_eval do
|
||||
after_create :increment_tag_custom_counter
|
||||
@@ -39,8 +45,6 @@ module ActsAsTaggableOn
|
||||
kind == "category"
|
||||
end
|
||||
|
||||
include Graphqlable
|
||||
|
||||
scope :public_for_api, -> do
|
||||
where(
|
||||
kind: [nil, "category"],
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
Rails.application.reloader.to_prepare do
|
||||
ActiveStorage::DirectUploadsController.class_eval do
|
||||
def create
|
||||
head :unauthorized
|
||||
@@ -9,3 +10,4 @@ ActiveStorage::DiskController.class_eval do
|
||||
head :unauthorized
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
Rails.application.reloader.to_prepare do
|
||||
Globalize::ActiveRecord::Translation.class_eval do
|
||||
include SkipValidation
|
||||
end
|
||||
end
|
||||
|
||||
module Globalize
|
||||
module ActiveRecord
|
||||
module InstanceMethods
|
||||
@@ -9,10 +15,6 @@ module Globalize
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Translation
|
||||
include SkipValidation
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
Rails.application.reloader.to_prepare do
|
||||
ActsAsVotable::Vote.class_eval do
|
||||
include Graphqlable
|
||||
end
|
||||
end
|
||||
|
||||
ActsAsVotable::Vote.class_eval do
|
||||
belongs_to :signature
|
||||
belongs_to :budget_investment, foreign_key: "votable_id", class_name: "Budget::Investment"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user