Class: ContentProviders::NewHarmfulThoughtFormProvider
- Inherits:
-
BitCore::ContentProvider
- Object
- BitCore::ContentProvider
- ContentProviders::NewHarmfulThoughtFormProvider
- Defined in:
- app/models/content_providers/new_harmful_thought_form_provider.rb
Overview
Provides a form for a Participant to enter a Thought.
Instance Method Summary collapse
- #data_attributes ⇒ Object
- #data_class_name ⇒ Object
- #render_current(options) ⇒ Object
- #show_nav_link? ⇒ Boolean
Instance Method Details
#data_attributes ⇒ Object
20 21 22 |
# File 'app/models/content_providers/new_harmful_thought_form_provider.rb', line 20 def data_attributes [:content, :effect, :pattern_id] end |
#data_class_name ⇒ Object
16 17 18 |
# File 'app/models/content_providers/new_harmful_thought_form_provider.rb', line 16 def data_class_name "Thought" end |
#render_current(options) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'app/models/content_providers/new_harmful_thought_form_provider.rb', line 5 def render_current() .view_context.render( template: "think_feel_do_engine/thoughts/new_harmful", locals: { thought: .participant.thoughts .build(effect: Thought::EFFECTS[:harmful]), create_path: .view_context.participant_data_path } ) end |
#show_nav_link? ⇒ Boolean
24 25 26 |
# File 'app/models/content_providers/new_harmful_thought_form_provider.rb', line 24 def show_nav_link? false end |