about summary refs log tree commit diff stats
path: root/app/controllers
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-06-25 00:00:28 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-06-25 00:00:28 -0400
commitad80c40944743515a45d70014e8d5ffb88cd74fc (patch)
tree0e97b3d46f3ed3594a1e4074e4a5a06deefcd76d /app/controllers
parent5581530930129d7854ed5d99d058939ad9c790c2 (diff)
downloadthoughts-ad80c40944743515a45d70014e8d5ffb88cd74fc.tar.gz
thoughts-ad80c40944743515a45d70014e8d5ffb88cd74fc.tar.bz2
thoughts-ad80c40944743515a45d70014e8d5ffb88cd74fc.zip
Started designing index page
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/entries_controller.rb7
-rw-r--r--app/controllers/records_controller.rb7
2 files changed, 14 insertions, 0 deletions
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 @@
1class EntriesController < ApplicationController
2
3 def show
4 @entry = Entry.where(directory: params[:directory], slug: params[:slug]).first
5 end
6
7end
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 @@
1class RecordsController < ApplicationController
2
3 def index
4 @records = Record.order(created_at: :desc).limit(20)
5 end
6
7end