left4me/rails/app/models/action.rb
mwiegand abf55c9af1
wip
2022-11-27 18:41:02 +01:00

13 lines
244 B
Ruby

class Action < ApplicationRecord
belongs_to :batch
belongs_to :actionable, polymorphic: true
def render
case actionable
when Execution
%(#{actionable.command.name} #{actionable.value})
else
to_s
end
end
end