Open rorong opened 6 years ago
Controller Code
@filterrific = initialize_filterrific( User.all, params[:filterrific], select_options: { sorted_by: User.options_for_sorted_by }
@filterrific = initialize_filterrific(
User.all,
params[:filterrific],
select_options: {
sorted_by: User.options_for_sorted_by
}
Model Code
filterrific( available_filters: [ :sorted_by, :with_name, :with_role, :with_start, :with_end, :from_ticket_ans, ] ) scope :with_end, -> (with_end) do where('date(users.created_at) <= ?', with_end) end
filterrific(
available_filters: [
:sorted_by,
:with_name,
:with_role,
:with_start,
:with_end,
:from_ticket_ans,
]
)
scope :with_end, -> (with_end) do
where('date(users.created_at) <= ?', with_end)
end
In above with_end scope i want to check if with_start scope is called and what is the params pass to it
with_end
with_start
Actually i Want all filterrific params in any scope please provide me solution
Controller Code
@filterrific = initialize_filterrific(
User.all,
params[:filterrific],
select_options: {
sorted_by: User.options_for_sorted_by
}
Model Code
filterrific(
available_filters: [
:sorted_by,
:with_name,
:with_role,
:with_start,
:with_end,
:from_ticket_ans,
]
)
scope :with_end, -> (with_end) do
where('date(users.created_at) <= ?', with_end)
end
In above
with_end
scope i want to check ifwith_start
scope is called and what is the params pass to itActually i Want all filterrific params in any scope please provide me solution