module ContestsConcern extend ActiveSupport::Concern def active_page(path) request.path.starts_with?(path) ? "active" : "" end end