Methods
C
F
N
Attributes
[R] people
Class Public methods
new()
# File rails/actionpack/examples/address_book_controller.rb, line 11
def initialize()          @people = [] end
Instance Public methods
create_person(data)
# File rails/actionpack/examples/address_book_controller.rb, line 12
def create_person(data)   people.unshift(Person.new(next_person_id, data["name"], data["email_address"], data["phone_number"])) end
find_person(topic_id)
# File rails/actionpack/examples/address_book_controller.rb, line 13
def find_person(topic_id) people.select { |person| person.id == person.to_i }.first end
next_person_id()
# File rails/actionpack/examples/address_book_controller.rb, line 14
def next_person_id()      people.first.id + 1 end