Skip to content

Commit c0b8911

Browse files
authored
Merge branch 'develop' into art/email-logs
2 parents 9920821 + 719a8f0 commit c0b8911

6 files changed

Lines changed: 19 additions & 6 deletions

File tree

INSTALLATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ You will need to set the Redis connection details there too. If you've followed
118118
the sample file should already contain the correct values for you, but if you've customised your
119119
setup you'll need to correct them.
120120

121+
You'll also need to copy the Active Storage configuration from `config/storage.sample.yml` to `config/storage.yml`.
122+
121123
If you are using MariaDB instead of MySQL, you will need to replace all occurrences of
122124
`utf8mb4_0900_ai_ci` with `utf8mb4_unicode_ci` in `db/schema.rb`.
123125

124-
You'll also need to copy the Active Storage configuration from `config/storage.sample.yml` to `config/storage.yml`.
125-
126126
Set up the database:
127127

128128
rails db:create

app/controllers/tags_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def category
3434
else
3535
@tag_set&.tags&.order(Arel.sql('COUNT(posts.id) DESC'))
3636
end
37-
@count = @tags&.count || 0
37+
@count = @tags&.size || 0
3838
table = params[:hierarchical].present? ? 'tags_paths' : 'tags'
3939
if @count.positive?
4040
@tags = @tags.left_joins(:posts).group(Arel.sql("#{table}.id"))

app/controllers/users_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def set_preference
174174
end
175175

176176
def posts
177-
@posts = if current_user&.privilege?('flag_curate')
177+
@posts = if current_user&.privilege?('flag_curate') || @user == current_user
178178
Post.all
179179
else
180180
Post.undeleted

app/views/posts/new.html.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@
3434
<div class="notice is-danger is-filled">
3535
You don't have a high enough trust level to post in the <%= @category.name %> category.
3636
</div>
37+
<p>Not where you meant to post? See <%= link_to 'Categories', categories_path %></p>
38+
3739
<% end %>

app/views/tags/category.html.erb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
<h1>Tags used in <%= @category.name %></h1>
44

5+
<% ApplicationRecord.with_lax_group_rules do %>
6+
57
<% if @tags == nil %>
68
<p>This category is missing its tag set. Set this in the Category settings (admin).</p>
79
<% end %>
@@ -53,5 +55,7 @@
5355

5456
<%= will_paginate @tags, renderer: BootstrapPagination::Rails %>
5557

56-
<% end %> <!-- unless @tags == nil -->
58+
<% end %> <%# unless @tags == nil %>
59+
60+
<% end %> <%# ApplicationRecord.with_lax_group_rules %>
5761

db/seeds/post_flag_types.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,11 @@
2424
This question has been asked before and has already been answered. It should be marked as a duplicate.
2525
confidential: false
2626
active: true
27-
post_type_id: <%= Question.post_type_id %>
27+
post_type_id: <%= Question.post_type_id %>
28+
29+
- name: generated by AI
30+
description: >
31+
This post appears to contain AI-generated content (such as ChatGPT) without [attribution](/help/referencing).
32+
confidential: false
33+
active: true
34+
post_type_id: null

0 commit comments

Comments
 (0)