Class: Participle::Prompt

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

Overview

Prompt storage.

Class Method Summary (collapse)

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