Skip to content

Commit 9fc6bb6

Browse files
committed
Merge branch 'master' of github.com:indentlabs/notebook
2 parents ac4d98a + c92c059 commit 9fc6bb6

8 files changed

+69
-12
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ gem 'barnes'
7474

7575
# Forum
7676
gem 'thredded', git: 'https://github.com/indentlabs/thredded.git', branch: 'feature/report-posts'
77+
# gem 'thredded', git: 'https://github.com/thredded/thredded', branch: 'master'
78+
# gem 'thredded', git: 'https://github.com/sudara/thredded', branch: 'master'
7779
gem 'rails-ujs'
7880
gem 'language_filter'
7981

Gemfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,15 +1286,15 @@ GEM
12861286
railties (>= 3.1)
12871287
database_cleaner (2.0.1)
12881288
database_cleaner-active_record (~> 2.0.0)
1289-
database_cleaner-active_record (2.0.0)
1289+
database_cleaner-active_record (2.0.1)
12901290
activerecord (>= 5.a)
12911291
database_cleaner-core (~> 2.0.0)
12921292
database_cleaner-core (2.0.1)
12931293
dateslices (0.0.4)
12941294
rails (> 4)
12951295
db_text_search (0.3.2)
12961296
activerecord (>= 4.1.15, < 7.0)
1297-
debug_inspector (1.0.0)
1297+
debug_inspector (1.1.0)
12981298
devise (4.8.0)
12991299
bcrypt (~> 3.0)
13001300
orm_adapter (~> 0.1)
@@ -1308,7 +1308,7 @@ GEM
13081308
erubi (1.10.0)
13091309
eventmachine (1.2.7)
13101310
execjs (2.8.1)
1311-
faraday (0.17.3)
1311+
faraday (0.17.4)
13121312
multipart-post (>= 1.2, < 3)
13131313
faraday_middleware (0.14.0)
13141314
faraday (>= 0.7.4, < 1.0)
@@ -1370,7 +1370,7 @@ GEM
13701370
thor (>= 0.14, < 2.0)
13711371
jquery-ui-rails (6.0.1)
13721372
railties (>= 3.2.16)
1373-
json (2.3.0)
1373+
json (2.5.1)
13741374
jwt (2.2.3)
13751375
kaminari (1.2.1)
13761376
activesupport (>= 4.1.0)
@@ -1409,7 +1409,7 @@ GEM
14091409
method_source (1.0.0)
14101410
mime-types (3.3.1)
14111411
mime-types-data (~> 3.2015)
1412-
mime-types-data (3.2020.0512)
1412+
mime-types-data (3.2021.0704)
14131413
mimemagic (0.3.10)
14141414
nokogiri (~> 1)
14151415
rake
@@ -1588,7 +1588,7 @@ GEM
15881588
terrapin (0.6.0)
15891589
climate_control (>= 0.0.3, < 1.0)
15901590
text-hyphen (1.4.1)
1591-
textstat (0.1.6)
1591+
textstat (0.1.7)
15921592
text-hyphen (~> 1.4, >= 1.4.1)
15931593
thor (1.1.0)
15941594
tilt (2.0.10)

app/models/users/user.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def update_without_password(params, *options)
293293
params.delete(:username)
294294
end
295295

296-
result = update_attributes(params, *options)
296+
result = update(params, *options)
297297
clean_up_passwords
298298
result
299299
end

app/views/layouts/forum.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<%= javascript_include_tag 'thredded',
1111
async: !Rails.application.config.assets.debug,
1212
defer: true %>
13-
<%== Gravatar.prefetch_dns %>
13+
<%== RailsGravatar.prefetch_dns_tag %>
1414
</head>
1515
<body data-in-app="true" class="<%= 'has-fixed-sidenav' if user_signed_in? %> <%= 'dark' if user_signed_in? && current_user.dark_mode_enabled? %>">
1616
<%= render 'layouts/sidenav' if user_signed_in? %>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This migration comes from active_storage (originally 20190112182829)
2+
class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0]
3+
def up
4+
unless column_exists?(:active_storage_blobs, :service_name)
5+
add_column :active_storage_blobs, :service_name, :string
6+
7+
if configured_service = ActiveStorage::Blob.service.name
8+
ActiveStorage::Blob.unscoped.update_all(service_name: configured_service)
9+
end
10+
11+
change_column :active_storage_blobs, :service_name, :string, null: false
12+
end
13+
end
14+
15+
def down
16+
remove_column :active_storage_blobs, :service_name
17+
end
18+
end
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This migration comes from active_storage (originally 20191206030411)
2+
class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0]
3+
def change
4+
create_table :active_storage_variant_records do |t|
5+
t.belongs_to :blob, null: false, index: false
6+
t.string :variation_digest, null: false
7+
8+
t.index %i[ blob_id variation_digest ], name: "index_active_storage_variant_records_uniqueness", unique: true
9+
t.foreign_key :active_storage_blobs, column: :blob_id
10+
end
11+
end
12+
end
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
class AddServiceNameMigrationAgain < ActiveRecord::Migration[6.1]
2+
def up
3+
unless column_exists?(:active_storage_blobs, :service_name)
4+
add_column :active_storage_blobs, :service_name, :string
5+
6+
if configured_service = ActiveStorage::Blob.service.name
7+
ActiveStorage::Blob.unscoped.update_all(service_name: configured_service)
8+
end
9+
10+
change_column :active_storage_blobs, :service_name, :string, null: false
11+
end
12+
end
13+
14+
def down
15+
remove_column :active_storage_blobs, :service_name
16+
end
17+
end

db/schema.rb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
# of editing this file, please use the migrations feature of Active Record to
33
# incrementally modify your database, and then regenerate this schema definition.
44
#
5-
# This file is the source Rails uses to define your schema when running `rails
6-
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
5+
# This file is the source Rails uses to define your schema when running `bin/rails
6+
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
77
# be faster and is potentially less error prone than running all of your
88
# migrations from scratch. Old migrations may fail to apply correctly if those
99
# migrations use external dependencies or application code.
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema.define(version: 2021_10_07_234707) do
13+
ActiveRecord::Schema.define(version: 2021_10_27_065954) do
1414

1515
create_table "active_storage_attachments", force: :cascade do |t|
1616
t.string "name", null: false
@@ -27,12 +27,19 @@
2727
t.string "filename", null: false
2828
t.string "content_type"
2929
t.text "metadata"
30-
t.bigint "byte_size", null: false
30+
t.integer "byte_size", null: false
3131
t.string "checksum", null: false
3232
t.datetime "created_at", null: false
33+
t.string "service_name", null: false
3334
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
3435
end
3536

37+
create_table "active_storage_variant_records", force: :cascade do |t|
38+
t.bigint "blob_id", null: false
39+
t.string "variation_digest", null: false
40+
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
41+
end
42+
3643
create_table "api_keys", force: :cascade do |t|
3744
t.integer "user_id"
3845
t.string "key"
@@ -3650,6 +3657,7 @@
36503657
end
36513658

36523659
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
3660+
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
36533661
add_foreign_key "api_keys", "users"
36543662
add_foreign_key "api_requests", "application_integrations"
36553663
add_foreign_key "api_requests", "integration_authorizations"

0 commit comments

Comments
 (0)