DRY for cards_controller.rb