Merge branch 'master' into dependabot/bundler/rmagick-4.2.6

This commit is contained in:
Andrew Brown 2022-09-05 17:41:48 -05:00 committed by GitHub
commit 1e34d3bfc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 185 additions and 122 deletions

View File

@ -1 +1 @@
2.7.5
2.7.6

View File

@ -74,8 +74,11 @@ gem 'barnes'
# Forum
gem 'thredded', git: 'https://github.com/indentlabs/thredded.git', branch: 'feature/report-posts'
# gem 'thredded', git: 'https://github.com/thredded/thredded', branch: 'master'
# gem 'thredded', path: "../thredded"
# gem 'thredded'
# gem 'thredded', git: 'https://github.com/sudara/thredded', branch: 'master'
gem 'rails-ujs'
gem 'language_filter'
gem 'onebox', git: 'https://github.com/indentlabs/onebox.git', branch: 'notebook-engine'

View File

@ -7,7 +7,7 @@ GIT
GIT
remote: https://github.com/indentlabs/onebox.git
revision: fa5addc8d1ba6e988f54a7c4a83a770ed1d638ce
revision: a9407791e1e870abb49271eca727719fb2f53917
branch: notebook-engine
specs:
onebox (2.2.19)
@ -26,13 +26,13 @@ GIT
GIT
remote: https://github.com/indentlabs/thredded.git
revision: 6ed40273e4696fc4f32013e4f2a101ff8658b960
revision: edd58a785cd18fb2d7967c1f74aeaa92d3d82fbd
branch: feature/report-posts
specs:
thredded (0.16.16)
thredded (1.0.1)
active_record_union (>= 1.3.0)
autoprefixer-rails
db_text_search (~> 0.3.2)
db_text_search
friendly_id
html-pipeline
htmlentities
@ -43,7 +43,7 @@ GIT
nokogiri
onebox (>= 1.8.99)
pundit (>= 1.1.0)
rails (>= 4.2.10, != 6.0.0.rc2)
rails (>= 5.2.0, != 6.0.0.rc2)
rails_gravatar
rinku
sanitize
@ -54,40 +54,40 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.4.6)
actionpack (= 6.1.4.6)
activesupport (= 6.1.4.6)
actioncable (6.1.6.1)
actionpack (= 6.1.6.1)
activesupport (= 6.1.6.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.4.6)
actionpack (= 6.1.4.6)
activejob (= 6.1.4.6)
activerecord (= 6.1.4.6)
activestorage (= 6.1.4.6)
activesupport (= 6.1.4.6)
actionmailbox (6.1.6.1)
actionpack (= 6.1.6.1)
activejob (= 6.1.6.1)
activerecord (= 6.1.6.1)
activestorage (= 6.1.6.1)
activesupport (= 6.1.6.1)
mail (>= 2.7.1)
actionmailer (6.1.4.6)
actionpack (= 6.1.4.6)
actionview (= 6.1.4.6)
activejob (= 6.1.4.6)
activesupport (= 6.1.4.6)
actionmailer (6.1.6.1)
actionpack (= 6.1.6.1)
actionview (= 6.1.6.1)
activejob (= 6.1.6.1)
activesupport (= 6.1.6.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.4.6)
actionview (= 6.1.4.6)
activesupport (= 6.1.4.6)
actionpack (6.1.6.1)
actionview (= 6.1.6.1)
activesupport (= 6.1.6.1)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.4.6)
actionpack (= 6.1.4.6)
activerecord (= 6.1.4.6)
activestorage (= 6.1.4.6)
activesupport (= 6.1.4.6)
actiontext (6.1.6.1)
actionpack (= 6.1.6.1)
activerecord (= 6.1.6.1)
activestorage (= 6.1.6.1)
activesupport (= 6.1.6.1)
nokogiri (>= 1.8.5)
actionview (6.1.4.6)
activesupport (= 6.1.4.6)
actionview (6.1.6.1)
activesupport (= 6.1.6.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
@ -99,26 +99,26 @@ GEM
activemodel (>= 5.2.0)
activestorage (>= 5.2.0)
activesupport (>= 5.2.0)
activejob (6.1.4.6)
activesupport (= 6.1.4.6)
activejob (6.1.6.1)
activesupport (= 6.1.6.1)
globalid (>= 0.3.6)
activemodel (6.1.4.6)
activesupport (= 6.1.4.6)
activemodel (6.1.6.1)
activesupport (= 6.1.6.1)
activemodel-serializers-xml (1.0.2)
activemodel (> 5.x)
activesupport (> 5.x)
builder (~> 3.1)
activerecord (6.1.4.6)
activemodel (= 6.1.4.6)
activesupport (= 6.1.4.6)
activestorage (6.1.4.6)
actionpack (= 6.1.4.6)
activejob (= 6.1.4.6)
activerecord (= 6.1.4.6)
activesupport (= 6.1.4.6)
marcel (~> 1.0.0)
activerecord (6.1.6.1)
activemodel (= 6.1.6.1)
activesupport (= 6.1.6.1)
activestorage (6.1.6.1)
actionpack (= 6.1.6.1)
activejob (= 6.1.6.1)
activerecord (= 6.1.6.1)
activesupport (= 6.1.6.1)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.4.6)
activesupport (6.1.6.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
@ -130,7 +130,7 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
authority (3.3.0)
activesupport (>= 3.0.0)
autoprefixer-rails (10.3.3.0)
autoprefixer-rails (10.4.7.0)
execjs (~> 2)
aws-eventstream (1.2.0)
aws-partitions (1.558.0)
@ -1308,8 +1308,8 @@ GEM
database_cleaner-core (2.0.1)
dateslices (0.0.4)
rails (> 4)
db_text_search (0.3.2)
activerecord (>= 4.1.15, < 7.0)
db_text_search (1.0.0)
activerecord (>= 4.1.15)
debug_inspector (1.1.0)
devise (4.8.1)
bcrypt (~> 3.0)
@ -1329,7 +1329,7 @@ GEM
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
engtagger (0.2.2)
erubi (1.10.0)
erubi (1.11.0)
event_emitter (0.2.6)
eventmachine (1.2.7)
execjs (2.8.1)
@ -1355,7 +1355,7 @@ GEM
haml (5.2.2)
temple (>= 0.8.0)
tilt
html-pipeline (2.14.0)
html-pipeline (2.14.2)
activesupport (>= 2)
nokogiri (>= 1.4)
htmlentities (4.3.4)
@ -1370,7 +1370,7 @@ GEM
http-form_data (2.3.0)
http-parser (1.2.3)
ffi-compiler (>= 1.0, < 2.0)
i18n (1.10.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
ibm_cloud_sdk_core (1.1.3)
concurrent-ruby (~> 1.0)
@ -1386,7 +1386,7 @@ GEM
image_processing (1.12.2)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.17, < 3)
inline_svg (1.7.2)
inline_svg (1.8.0)
activesupport (>= 3.0)
nokogiri (>= 1.6)
jmespath (1.6.0)
@ -1398,19 +1398,19 @@ GEM
railties (>= 3.2.16)
json (2.5.1)
jwt (2.2.3)
kaminari (1.2.1)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.1)
kaminari-activerecord (= 1.2.1)
kaminari-core (= 1.2.1)
kaminari-actionview (1.2.1)
kaminari-actionview (= 1.2.2)
kaminari-activerecord (= 1.2.2)
kaminari-core (= 1.2.2)
kaminari-actionview (1.2.2)
actionview
kaminari-core (= 1.2.1)
kaminari-activerecord (1.2.1)
kaminari-core (= 1.2.2)
kaminari-activerecord (1.2.2)
activerecord
kaminari-core (= 1.2.1)
kaminari-core (1.2.1)
kramdown (2.3.1)
kaminari-core (= 1.2.2)
kaminari-core (1.2.2)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
@ -1420,7 +1420,7 @@ GEM
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.15.0)
loofah (2.18.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
@ -1445,7 +1445,7 @@ GEM
mini_portile2 (2.8.0)
mini_racer (0.6.2)
libv8-node (~> 16.10.0.0)
minitest (5.15.0)
minitest (5.16.2)
multi_json (1.15.0)
multipart-post (2.1.1)
mustache (1.1.1)
@ -1453,10 +1453,10 @@ GEM
netrc (0.11.0)
newrelic_rpm (8.5.0)
nio4r (2.5.8)
nokogiri (1.13.6)
nokogiri (1.13.8)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.13.6-x86_64-linux)
nokogiri (1.13.8-x86_64-linux)
racc (~> 1.4)
opus-ruby (1.0.1)
ffi
@ -1480,15 +1480,15 @@ GEM
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
public_suffix (4.0.7)
puma (5.6.4)
nio4r (~> 2.0)
puma-heroku (2.0.0)
puma (>= 5.0, < 6.0)
pundit (2.1.1)
pundit (2.2.0)
activesupport (>= 3.0.0)
racc (1.6.0)
rack (2.2.3)
rack (2.2.4)
rack-mini-profiler (3.0.0)
rack (>= 1.2.0)
rack-pjax (1.1.0)
@ -1496,27 +1496,27 @@ GEM
rack (>= 1.1)
rack-proxy (0.7.0)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.1.4.6)
actioncable (= 6.1.4.6)
actionmailbox (= 6.1.4.6)
actionmailer (= 6.1.4.6)
actionpack (= 6.1.4.6)
actiontext (= 6.1.4.6)
actionview (= 6.1.4.6)
activejob (= 6.1.4.6)
activemodel (= 6.1.4.6)
activerecord (= 6.1.4.6)
activestorage (= 6.1.4.6)
activesupport (= 6.1.4.6)
rack-test (2.0.2)
rack (>= 1.3)
rails (6.1.6.1)
actioncable (= 6.1.6.1)
actionmailbox (= 6.1.6.1)
actionmailer (= 6.1.6.1)
actionpack (= 6.1.6.1)
actiontext (= 6.1.6.1)
actionview (= 6.1.6.1)
activejob (= 6.1.6.1)
activemodel (= 6.1.6.1)
activerecord (= 6.1.6.1)
activestorage (= 6.1.6.1)
activesupport (= 6.1.6.1)
bundler (>= 1.15.0)
railties (= 6.1.4.6)
railties (= 6.1.6.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.2)
rails-html-sanitizer (1.4.3)
loofah (~> 2.3)
rails-jquery-autocomplete (1.0.5)
rails (>= 3.2)
@ -1536,11 +1536,11 @@ GEM
sassc-rails (>= 1.3, < 3)
rails_gravatar (1.0.4)
actionview
railties (6.1.4.6)
actionpack (= 6.1.4.6)
activesupport (= 6.1.4.6)
railties (6.1.6.1)
actionpack (= 6.1.6.1)
activesupport (= 6.1.6.1)
method_source
rake (>= 0.13)
rake (>= 12.2)
thor (~> 1.0)
rake (13.0.6)
rb-fsevent (0.11.0)
@ -1622,10 +1622,10 @@ GEM
textstat (0.1.7)
text-hyphen (~> 1.4, >= 1.4.1)
thor (1.2.1)
tilt (2.0.10)
tilt (2.0.11)
timeago_js (3.0.2.2)
tribute (3.6.0.0)
tzinfo (2.0.4)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
@ -1654,7 +1654,7 @@ GEM
websocket-extensions (0.1.5)
word_count_analyzer (1.0.1)
engtagger
zeitwerk (2.5.4)
zeitwerk (2.6.0)
PLATFORMS
ruby

View File

@ -508,7 +508,10 @@ class ContentController < ApplicationController
@attribute_field = AttributeField.find_by(id: params[:field_id].to_i)
attribute_value = @attribute_field.attribute_values.order('created_at desc').find_or_initialize_by(entity_params)
attribute_value.user_id ||= current_user.id
attribute_value.value = field_params.fetch('value', '').to_i
new_universe_id = field_params.fetch('value', nil).to_i
new_universe_id = nil if new_universe_id == 0
attribute_value.value = new_universe_id
attribute_value.save!
@content = entity_params.fetch('entity_type').constantize.find_by(

View File

@ -16,8 +16,12 @@ class FoldersController < ApplicationController
end
def destroy
# Relocate all documents in this folder to the root "folder"
Document.where(folder_id: @folder.id).update_all(folder_id: nil)
# Relocate all child folders in this folder to the root "folder"
Folder.where(parent_folder_id: @folder.id).update_all(folder_id: nil)
@folder.destroy!
redirect_to(documents_path, notice: "Folder #{@folder.title} deleted!")
end

View File

@ -28,4 +28,6 @@ class ThreddedProxyController < ApplicationController
document = ForumsProsifyService.save_to_document(current_user, topic)
redirect_to document, notice: "Thread saved to document!"
end
end

View File

@ -22,7 +22,7 @@ class Footer extends React.Component {
</div>
</div>
Notebook.ai © 2016-2021 <a href='http://www.indentlabs.com' className='grey-text'>
Notebook.ai © 2016-2022 <a href='http://www.indentlabs.com' className='grey-text'>
Indent Labs, LLC
</a>
</div>

View File

@ -40,6 +40,7 @@ module HasChangelog
before_update do
if self.is_a?(Attribute)
# todo how to get current_user?
ContentChangeEvent.create(
user: find_current_user,
changed_fields: changes,

View File

@ -44,7 +44,7 @@ module Documents
# }
# ]
analysis.document_entities = []
watson.dig('entities').each do |entity|
watson.fetch('entities', []).each do |entity|
analysis.document_entities.build(
entity_type: entity_type_map_to_notebook_entity_type.fetch(entity.dig('type'), entity.dig('type')),
text: entity.dig('text'),
@ -67,7 +67,7 @@ module Documents
# "dbpedia_resource": "http://dbpedia.org/resource/Jeph_Loeb"
# },
analysis.document_concepts = []
watson.dig('concepts').each do |concept|
watson.fetch('concepts', []).each do |concept|
analysis.document_concepts.build(
text: concept.dig('text'),
relevance: concept.dig('relevance'),
@ -83,7 +83,7 @@ module Documents
# }
# ]
analysis.document_categories = []
watson.dig('categories').each do |category|
watson.fetch('categories', []).each do |category|
analysis.document_categories.build(
label: category.dig('label'),
score: category.dig('score')

View File

@ -126,10 +126,12 @@ class ForumReplacementService < Service
'computers' => 'electrical miracleboxes',
'confuse' => 'bumfuzzle',
'confused' => 'bumfuzzled',
'cookie' => 'choco chip bicky wicky',
'cookies' => 'choco chip bicky wickies',
'cookie' => 'naughty biscotti',
'cookies' => 'naughty biscottis',
'counterclockwise' => 'widdershin',
'courtroom' => 'legal objectionbox',
'cowboy' => 'colorado desparado',
'cowboys' => 'colorado desparados',
'cranberry' => 'wild redbean',
'crazy' => 'bonkers',
'cumberbatch' => 'Cramplescrunch',
@ -146,8 +148,8 @@ class ForumReplacementService < Service
'doorknob' => 'twisting plankhandle',
'doorknobs' => 'twisting plankhandles',
'doors' => 'wobbly flip-shutters',
'dragon' => "big boppin' fire droppin' flyin' thing",
'dragons' => "big boppin' fire droppin' flyin' things",
'dragon' => "wizard lizard",
'dragons' => "wizard lizards",
'earth' => '<span class="brown-text">earth</span>',
'electric' => '<span class="yellow-text">electric</span>',
'end my suffering' => "I'm having an absolutely fine time",
@ -166,6 +168,8 @@ class ForumReplacementService < Service
'fireworks' => 'merry fizzlebombs',
'fish' => 'aquatic blooper',
'fishes' => 'aquatic bloopers',
'flower' => 'frilly lily',
'flowers' => 'frilly lilies',
'fortnite' => 'hippity buildershooter',
'forums' => 'words warehouse',
'foo' => '<marquee direction="left">foooooooooooooooooooooooooooo</marquee>',
@ -196,6 +200,7 @@ class ForumReplacementService < Service
'hip' => 'hep',
'history' => 'lastpast yesteryear',
'homework' => 'timey wimey studystruggles',
'honey' => 'bees cheese',
'hot chocolate' => 'boiled chocowater',
'ice cold' => 'cooler than being cool',
'icky' => 'oofy doofy',
@ -218,6 +223,8 @@ class ForumReplacementService < Service
'lightbulb' => 'ceiling-bright',
'lightbulbs' => 'ceiling-brights',
'lizard people' => 'definitely normal human beings',
'llama' => 'coat goat',
'llamas' => 'coat goats',
'lock' => 'lumberlatch',
'locks' => 'lumberlatches',
'marker' => 'crockety snapwicket',
@ -231,8 +238,8 @@ class ForumReplacementService < Service
'mittens' => 'hand socks',
'money' => 'molded cheddar',
'moon' => 'night cheese',
'mosquito' => 'buzzy itchybee',
'mosquitoes' => 'buzzy itchybees',
'mosquito' => 'mighty bitey',
'mosquitoes' => 'mighty biteys',
'movie' => 'magical moving picture',
'movies' => 'magical moving pictures',
'murder' => 'mucduc',
@ -240,11 +247,15 @@ class ForumReplacementService < Service
'netflix and chill' => 'hulu and vibe',
'nice' => 'noice',
'night' => 'shadowtime',
'novel' => 'fiction depiction',
'novels' => 'fiction depictions',
'nugget' => "lil' nuggy",
'nuggets' => "lil' nuggies",
'oh no' => '<img src="http://2.bp.blogspot.com/_izy_T_tOZXY/SZwImBbXL8I/AAAAAAAABy4/FEEkvPJAD4g/s320/Kool-Aid.jpg" />',
'offensive' => 'bogue',
'oof' => '<marquee>oooooooooooooooooooooooooooooooooooooof</marquee>',
'oven' => 'boiler-broiler roasty-toasty',
'ovens' => 'boiler-broiler roasty-toasties',
'owo' => '(◕‿◕✿)',
'pancake' => 'roundy-yum',
'pancakes' => 'roundy-yums',
@ -275,6 +286,8 @@ class ForumReplacementService < Service
'reverse' => 'esrever',
'road' => 'cobble-stone-clippity-clop',
'roads' => 'cobble-stone-clippity-clops',
'rocking chair' => 'knitter-sitter',
'rocking chairs' => 'knitter-sitters',
'room' => 'human containment unit',
'same' => 'same',
'sandwich' => 'breaddystack',
@ -288,6 +301,8 @@ class ForumReplacementService < Service
'shenanigans' => 'silly fun',
'shoe' => 'leather winklepicker',
'shoes' => 'leather winklepickers',
'shrimp' => 'chill krill',
'shrimps' => 'chill krills',
'sick' => 'collywobble icky',
'skiing' => 'slippery snownoodle moving',
'skydiving' => 'falling out of the sky',
@ -310,6 +325,8 @@ class ForumReplacementService < Service
'stupid' => 'stoopid',
'success' => 'Yahtzee!',
'summer' => 'sunseason',
'sunset' => 'skylight twilight',
'sunsets' => 'skylight twilights',
'sup' => 'soup',
'sweater' => 'sheepity sleepity',
'sweaters' => 'sheepity sleepities',

View File

@ -1,4 +1,5 @@
<%# Treat universe values as if they're just link fields %>
<%=
render partial: "content/display/attribute_value/link",
locals: { value: value.map { |universe| "Universe-#{universe.id}" }, content: content }

View File

@ -5,7 +5,7 @@
<%= f.label field[:id], field[:label] %>
</div>
<% if !page.persisted? || (page.persisted? && page.universe && page.universe.user == current_user) || page.universe_id.nil? %>
<% if page.new_record? || (page.persisted? && page.universe && page.universe.user == current_user) || page.universe_id.nil? # || page.universe_id.zero? %>
<%# todo not like this %>
<%
valid_universes = []
@ -17,13 +17,15 @@
else
# Premium content
if current_user.on_premium_plan? \
|| PermissionService.user_has_active_promotion_for_this_content_type(user: current_user, content_type: page.class.name)
|| PermissionService.user_has_active_promotion_for_this_content_type(user: current_user, content_type: page.class.name) \
|| page.user == current_user
valid_universes += current_user.universes
# Allow premium users to add premium content to non-premium universes
valid_universes += current_user.contributable_universes
else
show_premium_notice = true
end

View File

@ -3,18 +3,18 @@
blocked_post = user_signed_in? && post.user.present? && post.user.blocked_by?(current_user)
%>
<%
# Mute the post if it's one line that starts with ( and ends with )
muted_post = post.present? && post.to_model.content.split("\n").reject(&:empty?).all? { |paragraph| paragraph.strip.start_with?('(') && paragraph.strip.end_with?(')') }
muted_post_classes = 'muted-thredded-post'
%>
<% if blocked_post %>
<div class='grey-text text-lighten-2'>
<em class="tooltipped" data-tooltip="This message is hidden because you've blocked the user it's from.">1 message hidden.</em>
</div>
<% else %>
<%
# Mute the post if it's one line that starts with ( and ends with )
muted_post = post.present? && post.to_model.content.split("\n").reject(&:empty?).all? { |paragraph| paragraph.strip.start_with?('(') && paragraph.strip.end_with?(')') }
muted_post_classes = 'muted-thredded-post'
%>
<%= render 'thredded/posts_common/before_first_unread_post', post: post if post.first_unread_in_page? %>
<%= content_tag :article, id: dom_id(post), class: "thredded--post thredded--#{post.read_state}--post #{muted_post ? muted_post_classes : 'card'}" do %>
<%= render 'thredded/posts_common/actions', post: post, actions: local_assigns[:actions] %>
@ -28,4 +28,4 @@
</p>
<% end %>
<% end %>
<% end %>
<% end %>

View File

@ -6,8 +6,14 @@
<%= user.thredded_display_name %>
</span>
<% else %>
<a href="<%= user_path %>">
<%= user.thredded_display_name %>
<% if user.forum_moderator? %>
<i class="material-icons tooltipped tiny blue-text" data-tooltip="Forum Moderator" style="position: relative; top: 2px">
health_and_safety
</i>
<% end %>
</a>
<%= render partial: 'thredded/users/badge', locals: { user: user } %>
<% end %>

View File

@ -229,6 +229,7 @@
</div>
<ul class="collapsible">
<% event.timeline_event_entities.order('entity_type').preload(:entity).group_by(&:entity_type).each do |entity_type, entity_list| %>
<% entity_list.reject! { |te_entity| te_entity.entity.nil? } %>
<li>
<% klass = content_class_from_name(entity_type) %>
<div class="collapsible-header">

View File

@ -96,6 +96,7 @@
</div>
<ul class="collapsible">
<% event_entities.each do |entity_type, entity_list| %>
<% entity_list.reject! { |te_entity| te_entity.entity.nil? } %>
<li>
<% klass = content_class_from_name(entity_type) %>
<div class="collapsible-header">

View File

@ -59,6 +59,10 @@ Rails.application.configure do
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
# Whitelist HashWithIndifferentAccess/TimeWithZone for changelog serialization
# config.active_record.yaml_column_permitted_classes = [HashWithIndifferentAccess, ActiveSupport::TimeWithZone, Time]
config.active_record.use_yaml_unsafe_load = true
# Set test-mode Stripe API key
Stripe.api_key = "sk_test_v37uWbseyPct6PpsfjTa3y1l"
config.stripe_publishable_key = 'pk_test_eXI4iyJ2gR9UOGJyJERvDlHF'

View File

@ -91,6 +91,10 @@ Rails.application.configure do
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
# Whitelist HashWithIndifferentAccess/TimeWithZone for changelog serialization
# config.active_record.yaml_column_permitted_classes = [HashWithIndifferentAccess, ActiveSupport::TimeWithZone, Time]
config.active_record.use_yaml_unsafe_load = true
# Devise default url options
config.action_mailer.default_url_options = { host: 'www.notebook.ai' }
config.active_job.default_url_options = { host: 'www.notebook.ai' }

View File

@ -0,0 +1,6 @@
class AddThreddedModerationIndices < ActiveRecord::Migration[6.1]
def change
add_index :thredded_posts, :created_at
add_index :thredded_posts, [:created_at, :postable_id]
end
end

View File

@ -0,0 +1,5 @@
class AddDeletedAtAndIdIndexToThredded < ActiveRecord::Migration[6.1]
def change
add_index :thredded_posts, [:id, :deleted_at]
end
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_10_27_065954) do
ActiveRecord::Schema.define(version: 2022_08_17_213907) do
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
@ -3184,10 +3184,13 @@ ActiveRecord::Schema.define(version: 2021_10_27_065954) do
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "deleted_at"
t.index ["created_at", "postable_id"], name: "index_thredded_posts_on_created_at_and_postable_id"
t.index ["created_at"], name: "index_thredded_posts_on_created_at"
t.index ["deleted_at", "messageboard_id"], name: "index_thredded_posts_on_deleted_at_and_messageboard_id"
t.index ["deleted_at", "postable_id"], name: "index_thredded_posts_on_deleted_at_and_postable_id"
t.index ["deleted_at", "user_id"], name: "index_thredded_posts_on_deleted_at_and_user_id"
t.index ["deleted_at"], name: "index_thredded_posts_on_deleted_at"
t.index ["id", "deleted_at"], name: "index_thredded_posts_on_id_and_deleted_at"
t.index ["messageboard_id"], name: "index_thredded_posts_on_messageboard_id"
t.index ["moderation_state", "updated_at"], name: "index_thredded_posts_for_display"
t.index ["postable_id"], name: "index_thredded_posts_on_postable_id"

View File

@ -1735,9 +1735,9 @@ browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.16.6, browserslist@^4
node-releases "^1.1.71"
buffer-from@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
version "1.1.2"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
buffer-indexof@^1.0.0:
version "1.1.1"
@ -6332,9 +6332,9 @@ source-map-resolve@^0.5.0:
urix "^0.1.0"
source-map-support@~0.5.12, source-map-support@~0.5.19:
version "0.5.19"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
version "0.5.21"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
@ -6626,9 +6626,9 @@ terser-webpack-plugin@^4.2.3:
webpack-sources "^1.4.3"
terser@^4.1.2:
version "4.8.0"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17"
integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==
version "4.8.1"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.1.tgz#a00e5634562de2239fd404c649051bf6fc21144f"
integrity sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==
dependencies:
commander "^2.20.0"
source-map "~0.6.1"