2015-09-11 18:04:45 +02:00
|
|
|
class PagesController < ApplicationController
|
|
|
|
require 'statistics'
|
|
|
|
|
|
|
|
def landing
|
2017-01-11 21:18:23 +01:00
|
|
|
query = TransactionsQuery.new(current_user)
|
2017-01-14 16:22:44 +01:00
|
|
|
@transactions = ActiveRecord::Base.connection.exec_query(query.query.order(query.arel_table[:time].desc).take(10).project(Arel.star).to_sql)
|
|
|
|
@requests = current_user.incoming_requests.open.includes(:creditor).take(10)
|
|
|
|
@notifications = current_user.notifications.unread
|
2017-01-11 21:18:23 +01:00
|
|
|
end
|
|
|
|
|
2017-01-14 16:22:44 +01:00
|
|
|
def sign_in_page
|
2015-09-11 18:04:45 +02:00
|
|
|
@statistics = Statistics.new
|
|
|
|
end
|
|
|
|
end
|