chinwagsocial/app/controllers/home_controller.rb

8 lines
300 B
Ruby
Raw Normal View History

2016-02-23 02:00:20 +11:00
class HomeController < ApplicationController
before_action :authenticate_user!
2016-02-23 02:00:20 +11:00
def index
@statuses = Status.where(account: ([current_user.account] + current_user.account.following)).where('reblog_of_id IS NULL OR account_id != ?', current_user.account.id).order('created_at desc')
2016-02-23 02:00:20 +11:00
end
end