Files
grecia/app/helpers/polls_helper.rb
2025-08-22 13:12:10 +02:00

23 lines
503 B
Ruby

module PollsHelper
def booth_name_with_location(booth)
location = booth.location.blank? ? "" : " (#{booth.location})"
booth.name + location
end
def results_menu?
controller_name == "polls" && action_name == "results"
end
def stats_menu?
controller_name == "polls" && action_name == "stats"
end
def info_menu?
controller_name == "polls" && action_name == "show"
end
def show_polls_description?
@active_poll.present? && @current_filter == "current"
end
end