mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +02:00
21 lines
479 B
Ruby
21 lines
479 B
Ruby
class Registrar::AccountActivitiesController < RegistrarController
|
|
load_and_authorize_resource
|
|
|
|
# before_action :set_invoice, only: [:show]
|
|
|
|
def index
|
|
account = current_user.registrar.cash_account
|
|
@q = account.activities.includes(:invoice).search(params[:q])
|
|
@q.sorts = 'id desc' if @q.sorts.empty?
|
|
@account_activities = @q.result.page(params[:page])
|
|
end
|
|
|
|
def show
|
|
end
|
|
|
|
private
|
|
|
|
def set_invoice
|
|
@invoice = Invoice.find(params[:id])
|
|
end
|
|
end
|