DEV: Apply syntax_tree formatting to app/*

This commit is contained in:
David Taylor
2023-01-09 12:20:10 +00:00
parent a641ce4b62
commit 5a003715d3
696 changed files with 18447 additions and 15481 deletions

View File

@ -2,7 +2,7 @@
class PostReply < ActiveRecord::Base
belongs_to :post
belongs_to :reply, foreign_key: :reply_post_id, class_name: 'Post'
belongs_to :reply, foreign_key: :reply_post_id, class_name: "Post"
validates_uniqueness_of :reply_post_id, scope: :post_id
validate :ensure_same_topic
@ -11,10 +11,7 @@ class PostReply < ActiveRecord::Base
def ensure_same_topic
if post.topic_id != reply.topic_id
self.errors.add(
:base,
I18n.t("activerecord.errors.models.post_reply.base.different_topic")
)
self.errors.add(:base, I18n.t("activerecord.errors.models.post_reply.base.different_topic"))
end
end
end