mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
Merge pull request #2166 from internetee/2165-ransack-fix
Fix ransack gem association response
This commit is contained in:
commit
f097de4a63
3 changed files with 6 additions and 6 deletions
|
@ -93,12 +93,12 @@ module Admin
|
|||
|
||||
def filter_by_receipt_date(invoices)
|
||||
date_from_param = params[:q][:receipt_date_gteq] if params[:q][:receipt_date_gteq].present?
|
||||
date_from = date_from_param ? Time.zone.parse(date_from_param) : -Float::INFINITY
|
||||
date_from = date_from_param ? Time.zone.parse(date_from_param) : nil
|
||||
|
||||
date_until_param = params[:q][:receipt_date_lteq] if params[:q][:receipt_date_lteq].present?
|
||||
date_until = date_until_param ? Time.zone.parse(date_from_param) : Float::INFINITY
|
||||
date_until = date_until_param ? Time.zone.parse(date_until_param) : nil
|
||||
|
||||
invoices.where(account_activity: { created_at: date_from..date_until })
|
||||
invoices.where(account_activities: { created_at: date_from..date_until })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue