Most important methods first

This commit is contained in:
David Heinemeier Hansson
2025-04-12 10:39:19 +02:00
parent 4d2ba5b432
commit bb64adfd1b
+4 -4
View File
@@ -6,15 +6,15 @@ module Card::Messages
after_save :capture_draft_comment
end
def capture(messageable)
messages.create! messageable: messageable
end
def comments
# FIXME: I could have sworn there was a way to declare this as a association?
Comment.joins(:message).where(messages: { card_id: id })
end
def capture(messageable)
messages.create! messageable: messageable
end
def draft_comment
find_or_build_initial_comment.body.content
end