File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,11 +118,11 @@ You will need to set the Redis connection details there too. If you've followed
118118the sample file should already contain the correct values for you, but if you've customised your
119119setup 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+
121123If 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-
126126Set up the database:
127127
128128 rails db:create
Original file line number Diff line number Diff 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" ) )
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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 %>
Original file line number Diff line number Diff line change 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 %>
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
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments