Skip to content

Commit 0f0a9db

Browse files
authored
Merge pull request #3211 from AlchemyCMS/backport/7.4-stable/pr-3209
[7.4-stable] Resource "Download CSV" link: Use all filter params
2 parents f311ab6 + 860cc8a commit 0f0a9db

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/views/alchemy/admin/resources/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
) %>
1818
<%= render Alchemy::Admin::ToolbarButton.new(
1919
icon: :download,
20-
url: resource_url_proxy.url_for(action: 'index', format: 'csv', q: search_filter_params[:q], sort: params[:sort]),
20+
url: resource_url_proxy.url_for(action: 'index', format: 'csv', **search_filter_params),
2121
label: Alchemy.t(:download_csv),
2222
title: Alchemy.t(:download_csv),
2323
dialog: false,

spec/features/admin/resources_integration_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@
9494
expect(page).to have_content("today 2")
9595
expect(page).to_not have_content("yesterday")
9696
end
97+
98+
within "#toolbar" do
99+
expect(page).to have_link(href: %r{/admin/events\.csv\?filter%5Bstart%5D=starting_today})
100+
end
97101
end
98102

99103
it "can combine multiple filters" do

0 commit comments

Comments
 (0)