Class: Participle::Prompt
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Participle::Prompt
- Defined in:
- lib/storage.rb
Overview
Prompt storage.
Class Method Summary (collapse)
-
+ (Array<Prompt>) by_room(room)
Get a list of prompts by room.
-
+ (Array<Prompt>) by_user(name)
Get a list of prompts by user.
Class Method Details
+ (Array<Prompt>) by_room(room)
Get a list of prompts by room.
93 94 95 |
# File 'lib/storage.rb', line 93 def self.by_room(room) Room.find_by_name(room).prompts || [] end |
+ (Array<Prompt>) by_user(name)
Get a list of prompts by user.
86 87 88 |
# File 'lib/storage.rb', line 86 def self.by_user(name) Prompt.where :user_name => name end |