From 60062f6d77a4abf7a8e76a110ed624da183bb97f Mon Sep 17 00:00:00 2001 From: matteo Date: Thu, 8 Jun 2023 16:41:36 +0200 Subject: [PATCH 1/7] allow fetching of articles that a group has published --- app/models/group.rb | 1 + app/resources/v1/group_resource.rb | 1 + db/schema.rb | 257 ++++++++++++++--------------- 3 files changed, 130 insertions(+), 129 deletions(-) diff --git a/app/models/group.rb b/app/models/group.rb index c442cf52..650c90bb 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -12,6 +12,7 @@ class Group < ApplicationRecord has_many :groups_permissions, class_name: 'GroupsPermissions', dependent: :destroy has_many :permissions, through: :groups_permissions has_many :mail_aliases + has_many :articles, foreign_key: :group_id scope :active, (lambda { joins(:memberships).merge(Membership.active).distinct diff --git a/app/resources/v1/group_resource.rb b/app/resources/v1/group_resource.rb index d9e91c81..1cfec9a9 100644 --- a/app/resources/v1/group_resource.rb +++ b/app/resources/v1/group_resource.rb @@ -18,6 +18,7 @@ def description_camofied has_many :memberships has_many :mail_aliases has_many :permissions + has_many :articles filter :active, apply: ->(records, _value, _options) { records.active } filter :kind, apply: ->(records, value, _options) { records.where(kind: value[0]) } diff --git a/db/schema.rb b/db/schema.rb index 146243fa..dc1ad7fd 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,8 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2022_12_19_204657) do - +ActiveRecord::Schema[7.0].define(version: 2022_12_07_160057) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -19,8 +18,8 @@ t.integer "status", default: 0, null: false t.string "message_id", null: false t.string "message_checksum", null: false - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["message_id", "message_checksum"], name: "index_action_mailbox_inbound_emails_uniqueness", unique: true end @@ -29,7 +28,7 @@ t.string "record_type", null: false t.bigint "record_id", null: false t.bigint "blob_id", null: false - t.datetime "created_at", null: false + t.datetime "created_at", precision: nil, null: false t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true end @@ -41,7 +40,7 @@ t.text "metadata" t.bigint "byte_size", null: false t.string "checksum", null: false - t.datetime "created_at", null: false + t.datetime "created_at", precision: nil, null: false t.string "service_name", null: false t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true end @@ -54,14 +53,14 @@ create_table "activities", id: :serial, force: :cascade do |t| t.integer "form_id" - t.datetime "deleted_at" + t.datetime "deleted_at", precision: nil t.decimal "price", precision: 8, scale: 2 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.string "cover_photo" t.string "location" - t.datetime "start_time" - t.datetime "end_time" + t.datetime "start_time", precision: nil + t.datetime "end_time", precision: nil t.string "title" t.string "description" t.integer "author_id" @@ -76,9 +75,9 @@ t.text "content" t.integer "article_id" t.integer "author_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.index ["article_id"], name: "index_article_comments_on_article_id" t.index ["author_id"], name: "index_article_comments_on_author_id" end @@ -86,10 +85,10 @@ create_table "articles", id: :serial, force: :cascade do |t| t.string "title" t.string "content" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "group_id" - t.datetime "deleted_at" + t.datetime "deleted_at", precision: nil t.boolean "publicly_visible", default: false, null: false t.integer "author_id" t.string "cover_photo" @@ -101,13 +100,13 @@ end create_table "board_room_presences", id: :serial, force: :cascade do |t| - t.datetime "start_time" - t.datetime "end_time" + t.datetime "start_time", precision: nil + t.datetime "end_time", precision: nil t.text "status" t.integer "user_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.index ["user_id"], name: "index_board_room_presences_on_user_id" end @@ -117,9 +116,9 @@ t.string "description" t.string "isbn" t.string "cover_photo" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false - t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at", precision: nil t.index ["isbn"], name: "index_books_on_isbn", unique: true end @@ -127,9 +126,9 @@ t.string "name", null: false t.date "date", null: false t.integer "author_id" - t.datetime "deleted_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "deleted_at", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["author_id"], name: "index_debit_collections_on_author_id" end @@ -139,9 +138,9 @@ t.date "start_date", null: false t.date "end_date" t.bigint "user_id" - t.datetime "deleted_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "deleted_at", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["user_id"], name: "index_debit_mandates_on_user_id" end @@ -150,9 +149,9 @@ t.integer "collection_id" t.string "description" t.decimal "amount", precision: 8, scale: 2 - t.datetime "deleted_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "deleted_at", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["collection_id"], name: "index_debit_transactions_on_collection_id" t.index ["user_id"], name: "index_debit_transactions_on_user_id" end @@ -160,9 +159,9 @@ create_table "form_closed_question_answers", id: :serial, force: :cascade do |t| t.integer "option_id" t.integer "response_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.integer "question_id" t.boolean "radio_question", default: false, null: false t.index ["question_id", "response_id"], name: "index_form_closed_question_answers_on_question_and_response", unique: true, where: "(radio_question IS TRUE)" @@ -172,9 +171,9 @@ create_table "form_closed_question_options", id: :serial, force: :cascade do |t| t.string "option" t.integer "question_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.integer "position", default: 0 end @@ -184,18 +183,18 @@ t.integer "position" t.boolean "required", default: false, null: false t.integer "form_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil end create_table "form_forms", id: :serial, force: :cascade do |t| t.integer "author_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" - t.datetime "respond_until" - t.datetime "respond_from" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil + t.datetime "respond_until", precision: nil + t.datetime "respond_from", precision: nil t.integer "group_id" t.integer "responses_count", default: 0, null: false t.index ["group_id"], name: "index_form_forms_on_group_id" @@ -205,9 +204,9 @@ t.text "answer" t.integer "response_id" t.integer "question_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.index ["response_id", "question_id"], name: "index_form_open_question_answers_on_response_id_and_question_id", unique: true end @@ -217,17 +216,17 @@ t.integer "position" t.boolean "required", default: false, null: false t.integer "form_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil end create_table "form_responses", id: :serial, force: :cascade do |t| t.integer "form_id" t.integer "user_id" - t.datetime "deleted_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "deleted_at", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.boolean "completed", default: false, null: false t.integer "lock_version" t.index ["form_id", "user_id"], name: "index_form_responses_on_form_id_and_user_id", unique: true @@ -236,9 +235,9 @@ create_table "forum_categories", id: :serial, force: :cascade do |t| t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.integer "threads_count", default: 0, null: false t.index ["deleted_at"], name: "index_forum_categories_on_deleted_at" end @@ -247,9 +246,9 @@ t.string "message" t.integer "author_id" t.integer "thread_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.index ["author_id"], name: "index_forum_posts_on_author_id" t.index ["deleted_at"], name: "index_forum_posts_on_deleted_at" t.index ["thread_id"], name: "index_forum_posts_on_thread_id" @@ -259,9 +258,9 @@ t.integer "user_id" t.integer "thread_id" t.integer "post_id" - t.datetime "deleted_at" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["thread_id"], name: "index_forum_read_threads_on_thread_id" t.index ["user_id"], name: "index_forum_read_threads_on_user_id" end @@ -270,10 +269,10 @@ t.string "title" t.integer "author_id" t.integer "category_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" - t.datetime "closed_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil + t.datetime "closed_at", precision: nil t.integer "posts_count", default: 0, null: false t.index ["author_id"], name: "index_forum_threads_on_author_id" t.index ["category_id"], name: "index_forum_threads_on_category_id" @@ -285,7 +284,7 @@ t.integer "sluggable_id", null: false t.string "sluggable_type", limit: 50 t.string "scope" - t.datetime "created_at" + t.datetime "created_at", precision: nil t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type" t.index ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id" @@ -294,9 +293,9 @@ create_table "groups", id: :serial, force: :cascade do |t| t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.text "description" t.string "kind", null: false t.string "recognized_at_gma" @@ -309,9 +308,9 @@ create_table "groups_permissions", id: :serial, force: :cascade do |t| t.integer "group_id" t.integer "permission_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.index ["deleted_at"], name: "index_groups_permissions_on_deleted_at" t.index ["group_id"], name: "index_groups_permissions_on_group_id" t.index ["permission_id"], name: "index_groups_permissions_on_permission_id" @@ -323,12 +322,12 @@ t.string "description" t.integer "group_id" t.integer "user_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.bigint "moderator_group_id" t.boolean "smtp_enabled", default: false - t.datetime "last_received_at" + t.datetime "last_received_at", precision: nil t.index ["email"], name: "index_mail_aliases_on_email", unique: true t.index ["moderator_group_id"], name: "index_mail_aliases_on_moderator_group_id" end @@ -336,9 +335,9 @@ create_table "memberships", id: :serial, force: :cascade do |t| t.integer "group_id" t.integer "user_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.date "start_date", null: false t.date "end_date" t.string "function" @@ -354,8 +353,8 @@ t.string "token", null: false t.integer "expires_in", null: false t.text "redirect_uri", null: false - t.datetime "created_at", null: false - t.datetime "revoked_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "revoked_at", precision: nil t.string "scopes" t.index ["token"], name: "index_oauth_access_grants_on_token", unique: true end @@ -366,8 +365,8 @@ t.string "token", null: false t.string "refresh_token" t.integer "expires_in" - t.datetime "revoked_at" - t.datetime "created_at", null: false + t.datetime "revoked_at", precision: nil + t.datetime "created_at", precision: nil, null: false t.string "scopes" t.index ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true t.index ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id" @@ -380,17 +379,17 @@ t.string "secret", null: false t.text "redirect_uri", null: false t.string "scopes", default: "", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.boolean "confidential", default: true, null: false t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true end create_table "permissions", id: :serial, force: :cascade do |t| t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.index ["deleted_at"], name: "index_permissions_on_deleted_at" t.index ["name"], name: "index_permissions_on_name", unique: true end @@ -398,9 +397,9 @@ create_table "permissions_users", id: :serial, force: :cascade do |t| t.integer "user_id" t.integer "permission_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.index ["deleted_at"], name: "index_permissions_users_on_deleted_at" t.index ["permission_id"], name: "index_permissions_users_on_permission_id" t.index ["user_id"], name: "index_permissions_users_on_user_id" @@ -409,9 +408,9 @@ create_table "photo_albums", id: :serial, force: :cascade do |t| t.string "title" t.date "date" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.boolean "publicly_visible", default: false, null: false t.bigint "author_id" t.bigint "group_id" @@ -422,9 +421,9 @@ create_table "photo_comments", id: :serial, force: :cascade do |t| t.text "content" - t.datetime "deleted_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "deleted_at", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "author_id" t.integer "photo_id" t.index ["author_id"], name: "index_photo_comments_on_author_id" @@ -434,15 +433,15 @@ create_table "photos", id: :serial, force: :cascade do |t| t.string "image" t.integer "photo_album_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.string "original_filename" t.integer "uploader_id" t.integer "comments_count", default: 0, null: false t.string "exif_make" t.string "exif_model" - t.datetime "exif_date_time_original" + t.datetime "exif_date_time_original", precision: nil t.string "exif_exposure_time" t.string "exif_aperture_value" t.string "exif_iso_speed_ratings" @@ -455,9 +454,9 @@ end create_table "polls", id: :serial, force: :cascade do |t| - t.datetime "deleted_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "deleted_at", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "author_id" t.integer "form_id" t.index ["author_id"], name: "index_polls_on_author_id" @@ -467,10 +466,10 @@ create_table "quickpost_messages", id: :serial, force: :cascade do |t| t.integer "author_id" t.text "message" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" - t.datetime "datetime" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil + t.datetime "datetime", precision: nil t.index ["datetime"], name: "index_quickpost_messages_on_datetime" t.index ["deleted_at"], name: "index_quickpost_messages_on_deleted_at" end @@ -480,19 +479,19 @@ t.string "slug", null: false t.string "content", null: false t.boolean "publicly_visible" - t.datetime "deleted_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "deleted_at", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.string "category", default: "vereniging" t.index ["slug"], name: "index_static_pages_on_slug", unique: true end create_table "stored_mails", force: :cascade do |t| - t.datetime "deleted_at" + t.datetime "deleted_at", precision: nil t.bigint "mail_alias_id" - t.datetime "received_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "received_at", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.bigint "inbound_email_id" t.index ["inbound_email_id"], name: "index_stored_mails_on_inbound_email_id" t.index ["mail_alias_id"], name: "index_stored_mails_on_mail_alias_id" @@ -502,9 +501,9 @@ t.string "email" t.string "username" t.string "password_digest" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at", precision: nil t.string "first_name", null: false t.string "last_name_prefix" t.string "last_name", null: false @@ -517,10 +516,10 @@ t.string "study" t.date "start_study" t.boolean "login_enabled", default: false, null: false - t.datetime "activated_at" + t.datetime "activated_at", precision: nil t.string "activation_token" t.string "avatar" - t.datetime "activation_token_valid_till" + t.datetime "activation_token_valid_till", precision: nil t.boolean "sidekiq_access" t.boolean "vegetarian", default: false t.string "otp_secret_key" @@ -553,9 +552,9 @@ t.date "deadline" t.integer "author_id", null: false t.integer "group_id" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false - t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at", precision: nil end create_table "versions", id: :serial, force: :cascade do |t| @@ -563,7 +562,7 @@ t.integer "item_id", null: false t.string "event", null: false t.string "whodunnit" - t.datetime "created_at" + t.datetime "created_at", precision: nil t.jsonb "object" t.jsonb "object_changes" t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id" From 388a4529f1e89a9516654046a6c735460c50dd35 Mon Sep 17 00:00:00 2001 From: matteo Date: Thu, 8 Jun 2023 16:45:39 +0200 Subject: [PATCH 2/7] this was probably redundant --- app/models/group.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/group.rb b/app/models/group.rb index 650c90bb..9296fc00 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -12,7 +12,7 @@ class Group < ApplicationRecord has_many :groups_permissions, class_name: 'GroupsPermissions', dependent: :destroy has_many :permissions, through: :groups_permissions has_many :mail_aliases - has_many :articles, foreign_key: :group_id + has_many :articles scope :active, (lambda { joins(:memberships).merge(Membership.active).distinct From b5f7669b500b2e8104fa61f76468edc94f1da158 Mon Sep 17 00:00:00 2001 From: matteo Date: Thu, 8 Jun 2023 16:47:27 +0200 Subject: [PATCH 3/7] undo schema changes? --- db/schema.rb | 257 ++++++++++++++++++++++++++------------------------- 1 file changed, 129 insertions(+), 128 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index dc1ad7fd..146243fa 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,8 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2022_12_07_160057) do +ActiveRecord::Schema.define(version: 2022_12_19_204657) do + # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -18,8 +19,8 @@ t.integer "status", default: 0, null: false t.string "message_id", null: false t.string "message_checksum", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.index ["message_id", "message_checksum"], name: "index_action_mailbox_inbound_emails_uniqueness", unique: true end @@ -28,7 +29,7 @@ t.string "record_type", null: false t.bigint "record_id", null: false t.bigint "blob_id", null: false - t.datetime "created_at", precision: nil, null: false + t.datetime "created_at", null: false t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true end @@ -40,7 +41,7 @@ t.text "metadata" t.bigint "byte_size", null: false t.string "checksum", null: false - t.datetime "created_at", precision: nil, null: false + t.datetime "created_at", null: false t.string "service_name", null: false t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true end @@ -53,14 +54,14 @@ create_table "activities", id: :serial, force: :cascade do |t| t.integer "form_id" - t.datetime "deleted_at", precision: nil + t.datetime "deleted_at" t.decimal "price", precision: 8, scale: 2 - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "cover_photo" t.string "location" - t.datetime "start_time", precision: nil - t.datetime "end_time", precision: nil + t.datetime "start_time" + t.datetime "end_time" t.string "title" t.string "description" t.integer "author_id" @@ -75,9 +76,9 @@ t.text "content" t.integer "article_id" t.integer "author_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.index ["article_id"], name: "index_article_comments_on_article_id" t.index ["author_id"], name: "index_article_comments_on_author_id" end @@ -85,10 +86,10 @@ create_table "articles", id: :serial, force: :cascade do |t| t.string "title" t.string "content" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "group_id" - t.datetime "deleted_at", precision: nil + t.datetime "deleted_at" t.boolean "publicly_visible", default: false, null: false t.integer "author_id" t.string "cover_photo" @@ -100,13 +101,13 @@ end create_table "board_room_presences", id: :serial, force: :cascade do |t| - t.datetime "start_time", precision: nil - t.datetime "end_time", precision: nil + t.datetime "start_time" + t.datetime "end_time" t.text "status" t.integer "user_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.index ["user_id"], name: "index_board_room_presences_on_user_id" end @@ -116,9 +117,9 @@ t.string "description" t.string "isbn" t.string "cover_photo" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.datetime "deleted_at" t.index ["isbn"], name: "index_books_on_isbn", unique: true end @@ -126,9 +127,9 @@ t.string "name", null: false t.date "date", null: false t.integer "author_id" - t.datetime "deleted_at", precision: nil - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["author_id"], name: "index_debit_collections_on_author_id" end @@ -138,9 +139,9 @@ t.date "start_date", null: false t.date "end_date" t.bigint "user_id" - t.datetime "deleted_at", precision: nil - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["user_id"], name: "index_debit_mandates_on_user_id" end @@ -149,9 +150,9 @@ t.integer "collection_id" t.string "description" t.decimal "amount", precision: 8, scale: 2 - t.datetime "deleted_at", precision: nil - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["collection_id"], name: "index_debit_transactions_on_collection_id" t.index ["user_id"], name: "index_debit_transactions_on_user_id" end @@ -159,9 +160,9 @@ create_table "form_closed_question_answers", id: :serial, force: :cascade do |t| t.integer "option_id" t.integer "response_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.integer "question_id" t.boolean "radio_question", default: false, null: false t.index ["question_id", "response_id"], name: "index_form_closed_question_answers_on_question_and_response", unique: true, where: "(radio_question IS TRUE)" @@ -171,9 +172,9 @@ create_table "form_closed_question_options", id: :serial, force: :cascade do |t| t.string "option" t.integer "question_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.integer "position", default: 0 end @@ -183,18 +184,18 @@ t.integer "position" t.boolean "required", default: false, null: false t.integer "form_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" end create_table "form_forms", id: :serial, force: :cascade do |t| t.integer "author_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil - t.datetime "respond_until", precision: nil - t.datetime "respond_from", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" + t.datetime "respond_until" + t.datetime "respond_from" t.integer "group_id" t.integer "responses_count", default: 0, null: false t.index ["group_id"], name: "index_form_forms_on_group_id" @@ -204,9 +205,9 @@ t.text "answer" t.integer "response_id" t.integer "question_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.index ["response_id", "question_id"], name: "index_form_open_question_answers_on_response_id_and_question_id", unique: true end @@ -216,17 +217,17 @@ t.integer "position" t.boolean "required", default: false, null: false t.integer "form_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" end create_table "form_responses", id: :serial, force: :cascade do |t| t.integer "form_id" t.integer "user_id" - t.datetime "deleted_at", precision: nil - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "completed", default: false, null: false t.integer "lock_version" t.index ["form_id", "user_id"], name: "index_form_responses_on_form_id_and_user_id", unique: true @@ -235,9 +236,9 @@ create_table "forum_categories", id: :serial, force: :cascade do |t| t.string "name" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.integer "threads_count", default: 0, null: false t.index ["deleted_at"], name: "index_forum_categories_on_deleted_at" end @@ -246,9 +247,9 @@ t.string "message" t.integer "author_id" t.integer "thread_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.index ["author_id"], name: "index_forum_posts_on_author_id" t.index ["deleted_at"], name: "index_forum_posts_on_deleted_at" t.index ["thread_id"], name: "index_forum_posts_on_thread_id" @@ -258,9 +259,9 @@ t.integer "user_id" t.integer "thread_id" t.integer "post_id" - t.datetime "deleted_at", precision: nil - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "deleted_at" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.index ["thread_id"], name: "index_forum_read_threads_on_thread_id" t.index ["user_id"], name: "index_forum_read_threads_on_user_id" end @@ -269,10 +270,10 @@ t.string "title" t.integer "author_id" t.integer "category_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil - t.datetime "closed_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" + t.datetime "closed_at" t.integer "posts_count", default: 0, null: false t.index ["author_id"], name: "index_forum_threads_on_author_id" t.index ["category_id"], name: "index_forum_threads_on_category_id" @@ -284,7 +285,7 @@ t.integer "sluggable_id", null: false t.string "sluggable_type", limit: 50 t.string "scope" - t.datetime "created_at", precision: nil + t.datetime "created_at" t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type" t.index ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id" @@ -293,9 +294,9 @@ create_table "groups", id: :serial, force: :cascade do |t| t.string "name" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.text "description" t.string "kind", null: false t.string "recognized_at_gma" @@ -308,9 +309,9 @@ create_table "groups_permissions", id: :serial, force: :cascade do |t| t.integer "group_id" t.integer "permission_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.index ["deleted_at"], name: "index_groups_permissions_on_deleted_at" t.index ["group_id"], name: "index_groups_permissions_on_group_id" t.index ["permission_id"], name: "index_groups_permissions_on_permission_id" @@ -322,12 +323,12 @@ t.string "description" t.integer "group_id" t.integer "user_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.bigint "moderator_group_id" t.boolean "smtp_enabled", default: false - t.datetime "last_received_at", precision: nil + t.datetime "last_received_at" t.index ["email"], name: "index_mail_aliases_on_email", unique: true t.index ["moderator_group_id"], name: "index_mail_aliases_on_moderator_group_id" end @@ -335,9 +336,9 @@ create_table "memberships", id: :serial, force: :cascade do |t| t.integer "group_id" t.integer "user_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.date "start_date", null: false t.date "end_date" t.string "function" @@ -353,8 +354,8 @@ t.string "token", null: false t.integer "expires_in", null: false t.text "redirect_uri", null: false - t.datetime "created_at", precision: nil, null: false - t.datetime "revoked_at", precision: nil + t.datetime "created_at", null: false + t.datetime "revoked_at" t.string "scopes" t.index ["token"], name: "index_oauth_access_grants_on_token", unique: true end @@ -365,8 +366,8 @@ t.string "token", null: false t.string "refresh_token" t.integer "expires_in" - t.datetime "revoked_at", precision: nil - t.datetime "created_at", precision: nil, null: false + t.datetime "revoked_at" + t.datetime "created_at", null: false t.string "scopes" t.index ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true t.index ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id" @@ -379,17 +380,17 @@ t.string "secret", null: false t.text "redirect_uri", null: false t.string "scopes", default: "", null: false - t.datetime "created_at", precision: nil - t.datetime "updated_at", precision: nil + t.datetime "created_at" + t.datetime "updated_at" t.boolean "confidential", default: true, null: false t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true end create_table "permissions", id: :serial, force: :cascade do |t| t.string "name" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.index ["deleted_at"], name: "index_permissions_on_deleted_at" t.index ["name"], name: "index_permissions_on_name", unique: true end @@ -397,9 +398,9 @@ create_table "permissions_users", id: :serial, force: :cascade do |t| t.integer "user_id" t.integer "permission_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.index ["deleted_at"], name: "index_permissions_users_on_deleted_at" t.index ["permission_id"], name: "index_permissions_users_on_permission_id" t.index ["user_id"], name: "index_permissions_users_on_user_id" @@ -408,9 +409,9 @@ create_table "photo_albums", id: :serial, force: :cascade do |t| t.string "title" t.date "date" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.boolean "publicly_visible", default: false, null: false t.bigint "author_id" t.bigint "group_id" @@ -421,9 +422,9 @@ create_table "photo_comments", id: :serial, force: :cascade do |t| t.text "content" - t.datetime "deleted_at", precision: nil - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "author_id" t.integer "photo_id" t.index ["author_id"], name: "index_photo_comments_on_author_id" @@ -433,15 +434,15 @@ create_table "photos", id: :serial, force: :cascade do |t| t.string "image" t.integer "photo_album_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.string "original_filename" t.integer "uploader_id" t.integer "comments_count", default: 0, null: false t.string "exif_make" t.string "exif_model" - t.datetime "exif_date_time_original", precision: nil + t.datetime "exif_date_time_original" t.string "exif_exposure_time" t.string "exif_aperture_value" t.string "exif_iso_speed_ratings" @@ -454,9 +455,9 @@ end create_table "polls", id: :serial, force: :cascade do |t| - t.datetime "deleted_at", precision: nil - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "author_id" t.integer "form_id" t.index ["author_id"], name: "index_polls_on_author_id" @@ -466,10 +467,10 @@ create_table "quickpost_messages", id: :serial, force: :cascade do |t| t.integer "author_id" t.text "message" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil - t.datetime "datetime", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" + t.datetime "datetime" t.index ["datetime"], name: "index_quickpost_messages_on_datetime" t.index ["deleted_at"], name: "index_quickpost_messages_on_deleted_at" end @@ -479,19 +480,19 @@ t.string "slug", null: false t.string "content", null: false t.boolean "publicly_visible" - t.datetime "deleted_at", precision: nil - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false + t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "category", default: "vereniging" t.index ["slug"], name: "index_static_pages_on_slug", unique: true end create_table "stored_mails", force: :cascade do |t| - t.datetime "deleted_at", precision: nil + t.datetime "deleted_at" t.bigint "mail_alias_id" - t.datetime "received_at", precision: nil - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false + t.datetime "received_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.bigint "inbound_email_id" t.index ["inbound_email_id"], name: "index_stored_mails_on_inbound_email_id" t.index ["mail_alias_id"], name: "index_stored_mails_on_mail_alias_id" @@ -501,9 +502,9 @@ t.string "email" t.string "username" t.string "password_digest" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.datetime "deleted_at" t.string "first_name", null: false t.string "last_name_prefix" t.string "last_name", null: false @@ -516,10 +517,10 @@ t.string "study" t.date "start_study" t.boolean "login_enabled", default: false, null: false - t.datetime "activated_at", precision: nil + t.datetime "activated_at" t.string "activation_token" t.string "avatar" - t.datetime "activation_token_valid_till", precision: nil + t.datetime "activation_token_valid_till" t.boolean "sidekiq_access" t.boolean "vegetarian", default: false t.string "otp_secret_key" @@ -552,9 +553,9 @@ t.date "deadline" t.integer "author_id", null: false t.integer "group_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deleted_at", precision: nil + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.datetime "deleted_at" end create_table "versions", id: :serial, force: :cascade do |t| @@ -562,7 +563,7 @@ t.integer "item_id", null: false t.string "event", null: false t.string "whodunnit" - t.datetime "created_at", precision: nil + t.datetime "created_at" t.jsonb "object" t.jsonb "object_changes" t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id" From f91abac0b6677647c1e8d24a1762a1f2702f4f6f Mon Sep 17 00:00:00 2001 From: matteo Date: Thu, 8 Jun 2023 16:50:17 +0200 Subject: [PATCH 4/7] fix schema by resetting db and rerunning db:migrate --- db/schema.rb | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 146243fa..da9932c0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,8 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2022_12_19_204657) do - +ActiveRecord::Schema[7.0].define(version: 2022_12_19_204657) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -19,8 +18,8 @@ t.integer "status", default: 0, null: false t.string "message_id", null: false t.string "message_checksum", null: false - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["message_id", "message_checksum"], name: "index_action_mailbox_inbound_emails_uniqueness", unique: true end @@ -117,8 +116,8 @@ t.string "description" t.string "isbn" t.string "cover_photo" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.datetime "deleted_at" t.index ["isbn"], name: "index_books_on_isbn", unique: true end @@ -260,8 +259,8 @@ t.integer "thread_id" t.integer "post_id" t.datetime "deleted_at" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["thread_id"], name: "index_forum_read_threads_on_thread_id" t.index ["user_id"], name: "index_forum_read_threads_on_user_id" end @@ -553,8 +552,8 @@ t.date "deadline" t.integer "author_id", null: false t.integer "group_id" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.datetime "deleted_at" end From 29a642c13feaead0d0b61e8ae8b7d869d05199cf Mon Sep 17 00:00:00 2001 From: DrumsnChocolate Date: Wed, 15 Nov 2023 14:15:42 +0100 Subject: [PATCH 5/7] fix tests by adding attribute --- spec/resources/v1/group_resource_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/resources/v1/group_resource_spec.rb b/spec/resources/v1/group_resource_spec.rb index a6032c4c..f93814cf 100644 --- a/spec/resources/v1/group_resource_spec.rb +++ b/spec/resources/v1/group_resource_spec.rb @@ -7,7 +7,7 @@ describe '#fetchable_fields' do let(:basic_fields) do - %i[id name avatar_url avatar_thumb_url created_at updated_at mail_aliases memberships users + %i[id name articles avatar_url avatar_thumb_url created_at updated_at mail_aliases memberships users permissions] end let(:authenticated_fields) do From 4425472b907a8d3aac13d85c05b2d9a61022ba78 Mon Sep 17 00:00:00 2001 From: lodewiges <131907615+lodewiges@users.noreply.github.com> Date: Sun, 19 Jan 2025 20:09:24 +0100 Subject: [PATCH 6/7] Fixed lint --- spec/resources/v1/group_resource_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/resources/v1/group_resource_spec.rb b/spec/resources/v1/group_resource_spec.rb index dd117fd3..4106f0fa 100644 --- a/spec/resources/v1/group_resource_spec.rb +++ b/spec/resources/v1/group_resource_spec.rb @@ -7,8 +7,8 @@ describe '#fetchable_fields' do let(:basic_fields) do - %i[id name articles avatar_url avatar_thumb_url created_at updated_at mail_aliases memberships users - permissions] + %i[id name articles avatar_url avatar_thumb_url created_at updated_at mail_aliases + memberships users permissions] end let(:authenticated_fields) do %i[description description_camofied kind recognized_at_gma rejected_at_gma administrative] From af55e44c2b1e1a525e8655b4a128499a560515a6 Mon Sep 17 00:00:00 2001 From: lodewiges <131907615+lodewiges@users.noreply.github.com> Date: Sun, 19 Jan 2025 20:25:53 +0100 Subject: [PATCH 7/7] Fixed lint v2.rb --- spec/resources/v1/group_resource_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/resources/v1/group_resource_spec.rb b/spec/resources/v1/group_resource_spec.rb index 4106f0fa..606e0f1b 100644 --- a/spec/resources/v1/group_resource_spec.rb +++ b/spec/resources/v1/group_resource_spec.rb @@ -7,8 +7,8 @@ describe '#fetchable_fields' do let(:basic_fields) do - %i[id name articles avatar_url avatar_thumb_url created_at updated_at mail_aliases - memberships users permissions] + %i[id name articles avatar_url avatar_thumb_url created_at updated_at mail_aliases + memberships users permissions] end let(:authenticated_fields) do %i[description description_camofied kind recognized_at_gma rejected_at_gma administrative]