Files
fizzy/app/models/command/go_to_card.rb
T
Jorge Manrubia 863ced55c4 Add tests
2025-05-06 14:17:28 +02:00

19 lines
270 B
Ruby

class Command::GoToCard < Command
store_accessor :data, :card_id
validates_presence_of :card
def title
"Visit card '#{card.title}'"
end
def execute
redirect_to card
end
private
def card
user.accessible_cards.find(card_id)
end
end