| Class | Prompt |
| In: |
app/models/prompt.rb
|
| Parent: | ActiveRecord::Base |
Create prompts based on conditions. If prime is true items used in prompts are relative to their stats values. Otherwise items used are randomly chosen.
Array of prompt ids.
| question_id<int>: | The question id. |
| voter_id<int>: | The voter id. |
| count<int>: | The number of prompts to generate. |
| algo<int>: | If exists, id of prompt algorithm to use. |
Otherwise not.
# File app/models/prompt.rb, line 26
26: def fetch(question_id, voter_id, count, algo)
27: Item.count(conditions(question_id)) > 1 ? create_prompts(question_id, voter_id, count, algo) : {}
28: end