Class: ContentProviders::NewCurrentEmotionProvider

Inherits:
BitCore::ContentProvider
  • Object
show all
Defined in:
app/models/content_providers/new_current_emotion_provider.rb

Overview

Participant rates their current mood

Instance Method Summary collapse

Instance Method Details

#data_attributesObject



23
24
25
# File 'app/models/content_providers/new_current_emotion_provider.rb', line 23

def data_attributes
  [:emotion_id, :name, :participant_id, :rating, :is_positive]
end

#data_class_nameObject



19
20
21
# File 'app/models/content_providers/new_current_emotion_provider.rb', line 19

def data_class_name
  "EmotionalRating"
end

#render_current(options) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/models/content_providers/new_current_emotion_provider.rb', line 5

def render_current(options)
  options.view_context.render(
    template: "think_feel_do_engine/emotions/new_current",
    locals: {
      emotional_rating: options
        .view_context
        .current_participant
        .emotional_ratings
        .build,
      create_path: options.view_context.participant_data_path
    }
  )
end

#show_nav_link?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'app/models/content_providers/new_current_emotion_provider.rb', line 27

def show_nav_link?
  false
end