Class: ContentProviders::NewCurrentFeelProvider

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

Overview

Participant rates their current mood

Instance Method Summary collapse

Instance Method Details

#data_attributesObject



18
19
20
# File 'app/models/content_providers/new_current_feel_provider.rb', line 18

def data_attributes
  [:rating]
end

#data_class_nameObject



14
15
16
# File 'app/models/content_providers/new_current_feel_provider.rb', line 14

def data_class_name
  "Mood"
end

#render_current(options) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'app/models/content_providers/new_current_feel_provider.rb', line 4

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

#show_nav_link?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'app/models/content_providers/new_current_feel_provider.rb', line 22

def show_nav_link?
  false
end