diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-05-12 14:53:31 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-05-12 14:53:31 -0400 |
commit | b7c5853de5f0f04625eab6389cba9de8b02e48fb (patch) | |
tree | 1764a974e1b93b024c90f98246590d0bac5430ef /app/controllers/streams_controller.rb | |
parent | 4016070f2caf30f576d0b0df8a65a7b4b468e951 (diff) | |
download | thoughts-b7c5853de5f0f04625eab6389cba9de8b02e48fb.tar.gz thoughts-b7c5853de5f0f04625eab6389cba9de8b02e48fb.tar.bz2 thoughts-b7c5853de5f0f04625eab6389cba9de8b02e48fb.zip |
Added streams index
Diffstat (limited to 'app/controllers/streams_controller.rb')
-rw-r--r-- | app/controllers/streams_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/streams_controller.rb b/app/controllers/streams_controller.rb index 9b7588c..aa81ab1 100644 --- a/app/controllers/streams_controller.rb +++ b/app/controllers/streams_controller.rb | |||
@@ -1,5 +1,9 @@ | |||
1 | class StreamsController < ApplicationController | 1 | class StreamsController < ApplicationController |
2 | 2 | ||
3 | def index | ||
4 | @streams = Stream.order(latest_post_at: :desc).paginate(page: params[:page], per_page: 10) | ||
5 | end | ||
6 | |||
3 | def show | 7 | def show |
4 | @stream = Stream.find_by_slug(params[:slug]) | 8 | @stream = Stream.find_by_slug(params[:slug]) |
5 | @updates = @stream.updates.paginate(page: params[:page], per_page: 10) | 9 | @updates = @stream.updates.paginate(page: params[:page], per_page: 10) |