Class: Participle::Prompt

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/storage.rb

Overview

Prompt storage.

Class Method Summary collapse

Class Method Details

.by_room(room) ⇒ Array<Prompt>

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

.by_user(name) ⇒ Array<Prompt>

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