From 49520d6e627e49a1f9f1b8cfa9b323450307fcc6 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 24 Aug 2016 17:56:44 +0200 Subject: Adding React.js, Redux, revamping dashboard --- app/controllers/application_controller.rb | 2 ++ app/controllers/home_controller.rb | 6 +++--- app/controllers/settings_controller.rb | 2 -- app/controllers/statuses_controller.rb | 2 -- 4 files changed, 5 insertions(+), 7 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c190abdf2..399faa21e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -12,6 +12,8 @@ class ApplicationController < ActionController::Base end end + helper_method :current_account + protected def current_account diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 9b0b36a86..57973ba49 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,9 +1,9 @@ class HomeController < ApplicationController - layout 'dashboard' - before_action :authenticate_user! def index - @timeline = Feed.new(:home, current_user.account).get(10, params[:max_id]) + @body_classes = 'app-body' + @home = Feed.new(:home, current_user.account).get(20) + @mentions = Feed.new(:mentions, current_user.account).get(20) end end diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb index cb4688292..f6ba958fb 100644 --- a/app/controllers/settings_controller.rb +++ b/app/controllers/settings_controller.rb @@ -1,6 +1,4 @@ class SettingsController < ApplicationController - layout 'dashboard' - before_action :authenticate_user! before_action :set_account diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb index 99f3e5079..d6779e0a7 100644 --- a/app/controllers/statuses_controller.rb +++ b/app/controllers/statuses_controller.rb @@ -1,6 +1,4 @@ class StatusesController < ApplicationController - layout 'dashboard' - before_action :authenticate_user! def create -- cgit