From ad80c40944743515a45d70014e8d5ffb88cd74fc Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 25 Jun 2017 00:00:28 -0400 Subject: Started designing index page --- app/controllers/entries_controller.rb | 7 +++++++ app/controllers/records_controller.rb | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 app/controllers/entries_controller.rb create mode 100644 app/controllers/records_controller.rb (limited to 'app/controllers') diff --git a/app/controllers/entries_controller.rb b/app/controllers/entries_controller.rb new file mode 100644 index 0000000..89d06c0 --- /dev/null +++ b/app/controllers/entries_controller.rb @@ -0,0 +1,7 @@ +class EntriesController < ApplicationController + + def show + @entry = Entry.where(directory: params[:directory], slug: params[:slug]).first + end + +end diff --git a/app/controllers/records_controller.rb b/app/controllers/records_controller.rb new file mode 100644 index 0000000..200d63c --- /dev/null +++ b/app/controllers/records_controller.rb @@ -0,0 +1,7 @@ +class RecordsController < ApplicationController + + def index + @records = Record.order(created_at: :desc).limit(20) + end + +end -- cgit 1.4.1