Skip to Content
Phoenix Web Development
book

Phoenix Web Development

by Brandon Richey
April 2018
Beginner to intermediate content levelBeginner to intermediate
406 pages
9h 33m
English
Packt Publishing
Content preview from Phoenix Web Development

Retrieving Presence data in ETS

The final piece of our puzzle is simple. We're going to do this purely as an exercise in understanding how the data is recorded in ETS. In reality, we'd want to lock this information down a little bit more to something like admins-only access. That's okay, though—the point of this is to learn and get a great handle on how to use this information. To make our lives easier, we'll implement a history action on our page controller and just build a simple list of all of the actions in the history logs:

  1. We'll start by adding a new entry into our routes file at lib/vocial_web/router.ex. In our main scope, add the following line:
get "/history", PageController, :history
  1. In PageController (lib/vocial_web/controllers/page_controller.ex ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Phoenix in Action

Phoenix in Action

Geoffrey Lessel
Real-Time Phoenix

Real-Time Phoenix

Stephen Bussey

Publisher Resources

ISBN: 9781787284197Supplemental Content