Sha256: 7544662916ee131689a3195bd3c57e1d5a5c3be3a1847f30c354c64549c5d72c

Contents?: true

Size: 804 Bytes

Versions: 10

Compression:

Stored size: 804 Bytes

Contents

module ContentProviders
  # Displays all feelings the participant has had in the past
  class IndexPastFeelProvider < BitCore::ContentProvider
    def data_class_name
      "Emotion"
    end

    def render_current(options)
      participant = options.view_context.current_participant
      visualization_service = MoodAndEmotionVisualizationService
                              .new(participant)

      options.view_context.render(
        template: "think_feel_do_engine/emotions/index",
        locals: {
          emotional_ratings: visualization_service
                               .emotional_rating_daily_averages,
          mood_ratings: visualization_service
                          .mood_rating_daily_averages
        }
      )
    end

    def show_nav_link?
      true
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
think_feel_do_engine-3.19.9 app/models/content_providers/index_past_feel_provider.rb
think_feel_do_engine-3.19.8 app/models/content_providers/index_past_feel_provider.rb
think_feel_do_engine-3.19.7 app/models/content_providers/index_past_feel_provider.rb
think_feel_do_engine-3.19.6 app/models/content_providers/index_past_feel_provider.rb
think_feel_do_engine-3.19.5 app/models/content_providers/index_past_feel_provider.rb
think_feel_do_engine-3.19.4 app/models/content_providers/index_past_feel_provider.rb
think_feel_do_engine-3.19.3 app/models/content_providers/index_past_feel_provider.rb
think_feel_do_engine-3.19.2 app/models/content_providers/index_past_feel_provider.rb
think_feel_do_engine-3.19.1 app/models/content_providers/index_past_feel_provider.rb
think_feel_do_engine-3.19.0 app/models/content_providers/index_past_feel_provider.rb