Files
fizzy/app/models/event/promptable.rb
T
Jorge Manrubia 8bb7783215 Extract "prompt generation" logic to models for events, comments and cards
So that we can reuse in other scenarios
2025-07-24 16:48:03 +02:00

15 lines
282 B
Ruby

module Event::Promptable
extend ActiveSupport::Concern
def to_prompt
<<~PROMPT
## Event #{action} (#{eventable_type} #{eventable_id}))
* Created at: #{created_at}
* Created by: #{creator.name}
#{eventable.to_prompt}
PROMPT
end
end