blob: 6b5863a5c5379dd07c1724e512a80030bce76518 (
plain)
1
2
3
4
5
6
7
8
9
10
|
# frozen_string_literal: true
module CreatedAtFilter
def by_created_at(items)
items = items.created_before(params[:created_before]) if params[:created_before].present?
items = items.created_after(params[:created_after]) if params[:created_after].present?
items
end
end
|