Skip to content

Commit f2a8657

Browse files
committed
Check all mailing lists by default
1 parent 2089b89 commit f2a8657

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/controllers/messages_controller.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ def index
1111

1212
page = params[:page].to_i
1313
list_ids = get_list_ids(params)
14+
if list_ids.empty?
15+
raise "Need to select at least one list"
16+
end
1417

1518
# %> and <-> are defined by pg_trgm.
1619
# https://www.postgresql.org/docs/17/pgtrgm.html

app/views/messages/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
].each do |name, label|
1717
%>
1818
<span>
19-
<%= form.check_box name, {checked: params[name] == '1' } %>
19+
<%= form.check_box name, {checked: params[name] != '0' } %>
2020
<%= form.label name, label %>
2121
</span>
2222
<% end %>

0 commit comments

Comments
 (0)