Files
nairobi/app/components/shared/recommended_index_component.rb
Javi Martín 3347e85017 Use a different parameter name in recommendex index
The problem with "recommended" is that it had identical singular and
plural, which means it wasn't clear whether we were using it to refer to
an item of a collection or to refer to the collection itself.
2025-08-22 13:40:45 +02:00

15 lines
488 B
Ruby

class Shared::RecommendedIndexComponent < ApplicationComponent
attr_reader :recommendations, :disable_recommendations_path, :namespace
use_helpers :current_path_with_query_params
def initialize(recommendations, disable_recommendations_path:, namespace:)
@recommendations = recommendations
@disable_recommendations_path = disable_recommendations_path
@namespace = namespace
end
def render?
feature?("user.recommendations") && recommendations.present?
end
end