mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
fixed codeclimate errors
This commit is contained in:
parent
b425a14f39
commit
48555c23b6
3 changed files with 6 additions and 6 deletions
|
@ -5,7 +5,7 @@ module Admin
|
||||||
def index
|
def index
|
||||||
@q = Account.includes(:registrar).search(params[:q])
|
@q = Account.includes(:registrar).search(params[:q])
|
||||||
@accounts = @q.result.page(params[:page])
|
@accounts = @q.result.page(params[:page])
|
||||||
@accounts = @accounts.per(params[:results_per_page]) if params[:results_per_page].to_i.positive?
|
@accounts = @accounts.per(params[:results_per_page]) if paginate?
|
||||||
|
|
||||||
render_by_format('admin/accounts/index', 'accounts')
|
render_by_format('admin/accounts/index', 'accounts')
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,10 +5,10 @@ class AccountActivity < ApplicationRecord
|
||||||
belongs_to :invoice
|
belongs_to :invoice
|
||||||
belongs_to :price, class_name: 'Billing::Price'
|
belongs_to :price, class_name: 'Billing::Price'
|
||||||
|
|
||||||
CREATE = 'create'
|
CREATE = 'create'.freeze
|
||||||
RENEW = 'renew'
|
RENEW = 'renew'.freeze
|
||||||
ADD_CREDIT = 'add_credit'
|
ADD_CREDIT = 'add_credit'.freeze
|
||||||
UPDATE_CREDIT = 'update_credit'
|
UPDATE_CREDIT = 'update_credit'.freeze
|
||||||
|
|
||||||
after_create :update_balance
|
after_create :update_balance
|
||||||
def update_balance
|
def update_balance
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<%= render @accounts %>
|
<%= render partial: 'account', collection: @accounts %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue