diff options
| -rw-r--r-- | app/controllers/events_controller.rb | 5 | ||||
| -rw-r--r-- | app/views/events/index.html.erb | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index b9b7892..be3f547 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb | |||
| @@ -17,6 +17,11 @@ class EventsController < ApplicationController | |||
| 17 | end | 17 | end |
| 18 | end | 18 | end |
| 19 | 19 | ||
| 20 | # GET /events/without_node | ||
| 21 | def without_node | ||
| 22 | @events = Event.where(node_id: nil).order(:start_time).paginate(page: params[:page], per_page: 25) | ||
| 23 | end | ||
| 24 | |||
| 20 | # GET /events/1 | 25 | # GET /events/1 |
| 21 | # GET /events/1.xml | 26 | # GET /events/1.xml |
| 22 | def show | 27 | def show |
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index f579fc0..8127e3a 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | <h1>Events</h1> | 1 | <h1>Events</h1> |
| 2 | 2 | ||
| 3 | <%= link_to 'New event', new_event_path, class: 'action_button' %> | 3 | <%= link_to 'New event', new_event_path, class: 'action_button' %> |
| 4 | <%= link_to 'View events without a page →', without_node_events_path %> | ||
| 4 | 5 | ||
| 5 | <%= will_paginate @events %> | 6 | <%= will_paginate @events %> |
| 6 | 7 | ||
