DEV: lint against Layout/EmptyLineBetweenDefs (#24914)

This commit is contained in:
Kelv
2023-12-15 23:46:04 +08:00
committed by GitHub
parent 15fc2a289a
commit 2477bcc32e
49 changed files with 124 additions and 0 deletions

View File

@@ -206,6 +206,7 @@ module HasCustomFields
class NotPreloadedError < StandardError
end
class PreloadedProxy
def initialize(preloaded, klass_with_custom_fields)
@preloaded = preloaded

View File

@@ -3,6 +3,7 @@
class DiscourseConnect < DiscourseConnectBase
class BlankExternalId < StandardError
end
class BannedExternalId < StandardError
end

View File

@@ -3,8 +3,10 @@
class Invite < ActiveRecord::Base
class UserExists < StandardError
end
class RedemptionFailed < StandardError
end
class ValidationFailed < StandardError
end

View File

@@ -250,6 +250,7 @@ class Tag < ActiveRecord::Base
def sanitize_description
self.description = sanitize_field(self.description) if description_changed?
end
def name_validator
errors.add(:name, :invalid) if name.present? && RESERVED_TAGS.include?(self.name.strip.downcase)
end

View File

@@ -3,6 +3,7 @@
class Topic < ActiveRecord::Base
class UserExists < StandardError
end
class NotAllowed < StandardError
end
include RateLimiter::OnCreateRecord