diff --git a/app/controllers/admin/communication/extranets/posts/categories_controller.rb b/app/controllers/admin/communication/extranets/posts/categories_controller.rb new file mode 100644 index 0000000000000000000000000000000000000000..e4180f3bd1e1dac519402cf76a13aab798361d25 --- /dev/null +++ b/app/controllers/admin/communication/extranets/posts/categories_controller.rb @@ -0,0 +1,67 @@ +class Admin::Communication::Extranets::Posts::CategoriesController < Admin::Communication::Extranets::ApplicationController + load_and_authorize_resource class: Communication::Extranet::Post::Category, through: :extranet + + def index + breadcrumb + end + + def show + breadcrumb + end + + def new + if current_user.person.present? + @post.author = current_user.person + end + breadcrumb + end + + def edit + breadcrumb + add_breadcrumb t('edit') + end + + def create + if @category.save + redirect_to admin_communication_extranet_post_category_path(@category), notice: t('admin.successfully_created_html', model: @category.to_s) + else + breadcrumb + render :new, status: :unprocessable_entity + end + end + + def update + @category.add_photo_import params[:photo_import] + if @category.update(category_params) + redirect_to admin_communication_extranet_post_category_path(@category), notice: t('admin.successfully_updated_html', model: @category.to_s) + else + breadcrumb + add_breadcrumb t('edit') + render :edit, status: :unprocessable_entity + end + end + + def destroy + @category.destroy + redirect_to admin_communication_extranet_post_categories_url, notice: t('admin.successfully_destroyed_html', model: @category.to_s) + end + + protected + + def breadcrumb + super + add_breadcrumb Communication::Extranet::Post::Category.model_name.human(count: 2), admin_communication_extranet_post_categories_path + breadcrumb_for @category + end + + def category_params + params.require(:communication_extranet_post_category) + .permit( + :name, + ) + .merge( + university_id: current_university.id + ) + end + +end \ No newline at end of file diff --git a/app/controllers/admin/communication/extranets/posts_controller.rb b/app/controllers/admin/communication/extranets/posts_controller.rb index 06a45778374b6f1367e919f4cbed248891ff78c9..dfbeada39a10887f4d3d08924fbf69e3cc178907 100644 --- a/app/controllers/admin/communication/extranets/posts_controller.rb +++ b/app/controllers/admin/communication/extranets/posts_controller.rb @@ -3,6 +3,7 @@ class Admin::Communication::Extranets::PostsController < Admin::Communication::E def index @posts = @posts.ordered.page params[:page] + @categories = @extranet.post_categories.ordered breadcrumb end @@ -17,7 +18,6 @@ class Admin::Communication::Extranets::PostsController < Admin::Communication::E end def new - @post.extranet = @extranet if current_user.person.present? @post.author = current_user.person end @@ -30,7 +30,6 @@ class Admin::Communication::Extranets::PostsController < Admin::Communication::E end def create - @post.extranet = @extranet @post.add_photo_import params[:photo_import] if @post.save redirect_to admin_communication_extranet_post_path(@post), notice: t('admin.successfully_created_html', model: @post.to_s) diff --git a/app/models/communication/extranet.rb b/app/models/communication/extranet.rb index 80bca7540d9803777a961a0a37367c821bc7177f..faabfae4280d7d6a74fa33af518642da3104aaf4 100644 --- a/app/models/communication/extranet.rb +++ b/app/models/communication/extranet.rb @@ -58,6 +58,7 @@ class Communication::Extranet < ApplicationRecord end has_many :posts + has_many :post_categories, class_name: 'Communication::Extranet::Post::Category' has_many :documents validates_presence_of :name, :host diff --git a/app/models/communication/extranet/post.rb b/app/models/communication/extranet/post.rb index 7c844d233c5418008e67eb29ca1edfab3b11cf6a..458d5f711dd5b5bd81bc7be29540e8980a73691d 100644 --- a/app/models/communication/extranet/post.rb +++ b/app/models/communication/extranet/post.rb @@ -13,12 +13,14 @@ # created_at :datetime not null # updated_at :datetime not null # author_id :uuid indexed +# category_id :uuid indexed # extranet_id :uuid not null, indexed # university_id :uuid not null, indexed # # Indexes # # index_communication_extranet_posts_on_author_id (author_id) +# index_communication_extranet_posts_on_category_id (category_id) # index_communication_extranet_posts_on_extranet_id (extranet_id) # index_communication_extranet_posts_on_university_id (university_id) # @@ -26,16 +28,17 @@ # # fk_rails_0232de42a1 (university_id => universities.id) # fk_rails_4341823eab (extranet_id => communication_extranets.id) +# fk_rails_7827da1fd1 (category_id => communication_extranet_post_categories.id) # fk_rails_86cc935add (author_id => university_people.id) # class Communication::Extranet::Post < ApplicationRecord include Sanitizable - include WithUniversity include WithFeaturedImage include WithBlocks include WithPublication include WithPermalink include WithSlug + include WithUniversity belongs_to :author, class_name: 'University::Person', optional: true belongs_to :extranet, class_name: 'Communication::Extranet' diff --git a/app/models/communication/extranet/post/category.rb b/app/models/communication/extranet/post/category.rb new file mode 100644 index 0000000000000000000000000000000000000000..d02d4316b55e8706ae1d4b04f0443640d120198b --- /dev/null +++ b/app/models/communication/extranet/post/category.rb @@ -0,0 +1,33 @@ +# == Schema Information +# +# Table name: communication_extranet_post_categories +# +# id :uuid not null, primary key +# name :string +# slug :string +# created_at :datetime not null +# updated_at :datetime not null +# extranet_id :uuid not null, indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# index_communication_extranet_post_categories_on_extranet_id (extranet_id) +# index_communication_extranet_post_categories_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_aad7b8db63 (university_id => universities.id) +# fk_rails_e53c2a25fc (extranet_id => communication_extranets.id) +# +class Communication::Extranet::Post::Category < ApplicationRecord + include WithUniversity + + belongs_to :extranet, class_name: 'Communication::Extranet' + + scope :ordered, -> { order(:name) } + + def to_s + "#{name}" + end +end diff --git a/app/models/communication/extranet/with_features.rb b/app/models/communication/extranet/with_features.rb index cc55664d9a07b799c01a98f4df618ea78d742feb..d9821981ec96831e6dd0839055cfa69030622e17 100644 --- a/app/models/communication/extranet/with_features.rb +++ b/app/models/communication/extranet/with_features.rb @@ -3,10 +3,10 @@ module Communication::Extranet::WithFeatures included do FEATURES = [ - :alumni, - :contacts, :posts, + :contacts, :library, + :alumni, :jobs, ] end diff --git a/app/views/admin/communication/extranets/posts/categories/_form.html.erb b/app/views/admin/communication/extranets/posts/categories/_form.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..e82335fbeb15088be8e18bc6e108175dcef5957c --- /dev/null +++ b/app/views/admin/communication/extranets/posts/categories/_form.html.erb @@ -0,0 +1,38 @@ +<%= simple_form_for [:admin, post] do |f| %> + <%= f.error_notification %> + <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %> + + <div class="row"> + <div class="col-md-8"> + <%= osuny_panel t('content') do %> + <%= f.input :title %> + <%= render 'admin/application/summary/form', f: f, about: post %> + <% end %> + </div> + <div class="col-md-4"> + <%= osuny_panel t('metadata') do %> + <% if can? :publish, post %> + <div class="row pure__row--small"> + <div class="col-6"> + <%= f.input :published %> + </div> + </div> + <%= f.input :published_at, html5: true, as: :date %> + <% end %> + <%= f.association :author, + collection: @extranet.connected_persons.ordered, + label_method: :to_s_alphabetical %> + <%= f.input :slug, + as: :string, + input_html: post.persisted? ? {} : { + class: 'js-slug-input', + data: { source: '#communication_extranet_post_title' } + } %> + <% end %> + <%= render 'admin/application/featured_image/edit', about: @post, f: f %> + </div> + </div> + <% content_for :action_bar_right do %> + <%= submit f %> + <% end %> +<% end %> diff --git a/app/views/admin/communication/extranets/posts/categories/_list.html.erb b/app/views/admin/communication/extranets/posts/categories/_list.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..461b8086a281ff598ae27e85899c4ae4851b3366 --- /dev/null +++ b/app/views/admin/communication/extranets/posts/categories/_list.html.erb @@ -0,0 +1,30 @@ +<div class="table-responsive"> + <table class="<%= table_classes %>"> + <thead> + <tr> + <th class="ps-0" width="60%"><%= Communication::Extranet::Post::Category.human_attribute_name('name') %></th> + <th></th> + </tr> + </thead> + <tbody> + <% categories.each do |category| %> + <tr> + <td class="ps-0"><%= link_to category, admin_communication_extranet_post_category_path(extranet_id: category.extranet.id, id: category.id) %></td> + + <td> + <div class="btn-group" role="group"> + <%= link_to t('edit'), + edit_admin_communication_extranet_post_path(website_id: post.extranet.id, id: post.id), + class: button_classes if can?(:update, post) %> + <%= link_to t('delete'), + admin_communication_extranet_post_path(extranet_id: post.extranet.id, id: post.id), + method: :delete, + data: { confirm: t('please_confirm') }, + class: button_classes_danger if can?(:destroy, post) %> + </div> + </td> + </tr> + <% end %> + </tbody> + </table> +</div> diff --git a/app/views/admin/communication/extranets/posts/categories/edit.html.erb b/app/views/admin/communication/extranets/posts/categories/edit.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..834ab342d7f5e13313cf8ebb245946da21961cfc --- /dev/null +++ b/app/views/admin/communication/extranets/posts/categories/edit.html.erb @@ -0,0 +1,5 @@ +<% content_for :title, @post %> + +<%= render 'admin/communication/extranets/sidebar' do %> + <%= render 'form', post: @post %> +<% end %> diff --git a/app/views/admin/communication/extranets/posts/categories/index.html.erb b/app/views/admin/communication/extranets/posts/categories/index.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..421c1358200a4fba552eb203b200d2fee0a8d24f --- /dev/null +++ b/app/views/admin/communication/extranets/posts/categories/index.html.erb @@ -0,0 +1,9 @@ +<% content_for :title, Communication::Extranet::Post::Category.model_name.human(count: 2) %> + +<%= render 'admin/communication/extranets/sidebar' do %> + <%= render 'admin/communication/extranets/posts/categories/list', categories: @categories %> +<% end %> + +<% content_for :action_bar_right do %> + <%= create_link Communication::Extranet::Post::Category %> +<% end %> \ No newline at end of file diff --git a/app/views/admin/communication/extranets/posts/categories/new.html.erb b/app/views/admin/communication/extranets/posts/categories/new.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..90355fd68bb218aa81575b670ee4c2270682efee --- /dev/null +++ b/app/views/admin/communication/extranets/posts/categories/new.html.erb @@ -0,0 +1,5 @@ +<% content_for :title, Communication::Extranet::Post.model_name.human %> + +<%= render 'admin/communication/extranets/sidebar' do %> + <%= render 'form', post: @post %> +<% end %> diff --git a/app/views/admin/communication/extranets/posts/categories/preview.html.erb b/app/views/admin/communication/extranets/posts/categories/preview.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..14bd7cd482e0666eb021ef6bb70d0732497bf91f --- /dev/null +++ b/app/views/admin/communication/extranets/posts/categories/preview.html.erb @@ -0,0 +1,3 @@ +<% content_for :title, @post.title %> +<% content_for :image, kamifusen_tag(@post.featured_image) if @post.featured_image.attached? %> +<%= render 'admin/communication/blocks/preview', about: @post %> diff --git a/app/views/admin/communication/extranets/posts/categories/show.html.erb b/app/views/admin/communication/extranets/posts/categories/show.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..ad9c804d175b4e4646f32224c592078f240ca9f0 --- /dev/null +++ b/app/views/admin/communication/extranets/posts/categories/show.html.erb @@ -0,0 +1,47 @@ +<% content_for :title, @post %> + +<%= render 'admin/communication/extranets/sidebar' do %> + <div class="row"> + <div class="col-xl-8"> + <%= render 'admin/application/summary/show', about: @post %> + <%= render 'admin/communication/blocks/list', about: @post %> + </div> + <div class="col-xl-4"> + <% + action = '' + action += link_to t('open'), + posts_communication_extranet_post_url(@post.slug, host: @post.extranet.url, extranet_id: nil), + target: :_blank, + class: 'btn btn-light btn-xs' if @post.published + %> + <%= osuny_panel t('metadata'), action: action do %> + <div class="row pure__row--small"> + <div class="col-6"> + <%= osuny_label Communication::Extranet::Post.human_attribute_name('published') %> + <p> + <%= t @post.published %><% if @post.published & @post.published_at %>, + <%= l @post.published_at.to_date, format: :long if @post.published_at %> + <% end %> + </p> + </div> + </div> + <% if @post.author %> + <%= osuny_label Communication::Extranet::Post.human_attribute_name('author') %> + <p><%= @post.author %></p> + <% end %> + <%= osuny_label Communication::Extranet::Post.human_attribute_name('slug') %> + <p><%= @post.slug %></p> + <% end %> + <%= render 'admin/application/featured_image/show', about: @post %> + </div> + </div> +<% end %> + +<% content_for :action_bar_left do %> + <%= destroy_link @post %> +<% end %> + +<% content_for :action_bar_right do %> + <%= preview_link %> + <%= edit_link @post %> +<% end %> diff --git a/app/views/admin/communication/extranets/posts/index.html.erb b/app/views/admin/communication/extranets/posts/index.html.erb index e1daf4ea040673e18b2ac2d6645b03e2acd23639..ea6456ecdbbe5c026a56c6001dc4a5d73a79d960 100644 --- a/app/views/admin/communication/extranets/posts/index.html.erb +++ b/app/views/admin/communication/extranets/posts/index.html.erb @@ -1,8 +1,15 @@ <% content_for :title, Communication::Extranet.human_attribute_name(:feature_posts) %> <%= render 'admin/communication/extranets/sidebar' do %> - <%= render 'admin/communication/extranets/posts/list', posts: @posts %> - <%= paginate @posts, theme: 'bootstrap-5' %> + <section class="mb-5"> + <%= render 'admin/communication/extranets/posts/list', posts: @posts %> + <%= paginate @posts, theme: 'bootstrap-5' %> + </section> + + <% action = link_to t('create'), new_admin_communication_extranet_posts_category_path, class: button_classes %> + <%= osuny_panel Communication::Website::Category.model_name.human(count: 2), action: action do %> + <%= render 'admin/communication/extranets/posts/categories/list', categories: @categories %> + <% end %> <% end %> <% content_for :action_bar_right do %> diff --git a/config/routes/admin/communication.rb b/config/routes/admin/communication.rb index b9e462905f3284ebe3bc4e70198e8228ea2e33ad..41481b3c1066f5f5bc37d27fdb306e7f0e95e5c0 100644 --- a/config/routes/admin/communication.rb +++ b/config/routes/admin/communication.rb @@ -73,6 +73,9 @@ namespace :communication do post :disconnect end end + namespace :posts do + resources :categories, controller: 'extranets/posts/categories' + end resources :posts, controller: 'extranets/posts' do member do get :preview diff --git a/db/migrate/20230309131421_create_communication_extranet_post_categories.rb b/db/migrate/20230309131421_create_communication_extranet_post_categories.rb new file mode 100644 index 0000000000000000000000000000000000000000..63443ace3d021bcb5a644cd2e3f10f5304b1324e --- /dev/null +++ b/db/migrate/20230309131421_create_communication_extranet_post_categories.rb @@ -0,0 +1,14 @@ +class CreateCommunicationExtranetPostCategories < ActiveRecord::Migration[7.0] + def change + create_table :communication_extranet_post_categories, id: :uuid do |t| + t.string :name + t.string :slug + t.references :extranet, null: false, foreign_key: {to_table: :communication_extranets}, type: :uuid + t.references :university, null: false, foreign_key: true, type: :uuid + + t.timestamps + end + + add_reference :communication_extranet_posts, :category, foreign_key: {to_table: :communication_extranet_post_categories}, type: :uuid + end +end diff --git a/db/schema.rb b/db/schema.rb index a6e4c7da3607d29bc7790e3ccc1c8c3dfb5533d1..b33eb378e2f9292532f2d0c40f29124ed0acf236 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_03_09_111101) do +ActiveRecord::Schema[7.0].define(version: 2023_03_09_131421) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" @@ -117,6 +117,17 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_09_111101) do t.index ["university_id"], name: "index_communication_extranet_documents_on_university_id" end + create_table "communication_extranet_post_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.string "name" + t.string "slug" + t.uuid "extranet_id", null: false + t.uuid "university_id", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["extranet_id"], name: "index_communication_extranet_post_categories_on_extranet_id" + t.index ["university_id"], name: "index_communication_extranet_post_categories_on_university_id" + end + create_table "communication_extranet_posts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "title" t.boolean "published", default: false @@ -130,7 +141,9 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_09_111101) do t.text "summary" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.uuid "category_id" t.index ["author_id"], name: "index_communication_extranet_posts_on_author_id" + t.index ["category_id"], name: "index_communication_extranet_posts_on_category_id" t.index ["extranet_id"], name: "index_communication_extranet_posts_on_extranet_id" t.index ["university_id"], name: "index_communication_extranet_posts_on_university_id" end @@ -201,6 +214,18 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_09_111101) do t.index ["communication_website_post_id", "communication_website_category_id"], name: "post_category" end + create_table "communication_website_connections", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.uuid "university_id", null: false + t.uuid "website_id", null: false + t.string "object_type", null: false + t.uuid "object_id", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["object_type", "object_id"], name: "index_communication_website_connections_on_object" + t.index ["university_id"], name: "index_communication_website_connections_on_university_id" + t.index ["website_id"], name: "index_communication_website_connections_on_website_id" + end + create_table "communication_website_git_files", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "previous_path" t.string "about_type", null: false @@ -389,7 +414,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_09_111101) do t.index ["university_id"], name: "index_communication_website_pages_on_university_id" end - create_table "communication_website_permalinks", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_permalinks", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.string "about_type", null: false @@ -988,6 +1013,9 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_09_111101) do add_foreign_key "communication_extranet_connections", "universities" add_foreign_key "communication_extranet_documents", "communication_extranets", column: "extranet_id" add_foreign_key "communication_extranet_documents", "universities" + add_foreign_key "communication_extranet_post_categories", "communication_extranets", column: "extranet_id" + add_foreign_key "communication_extranet_post_categories", "universities" + add_foreign_key "communication_extranet_posts", "communication_extranet_post_categories", column: "category_id" add_foreign_key "communication_extranet_posts", "communication_extranets", column: "extranet_id" add_foreign_key "communication_extranet_posts", "universities" add_foreign_key "communication_extranet_posts", "university_people", column: "author_id" @@ -998,6 +1026,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_09_111101) do add_foreign_key "communication_website_categories", "education_programs", column: "program_id" add_foreign_key "communication_website_categories", "languages" add_foreign_key "communication_website_categories", "universities" + add_foreign_key "communication_website_connections", "communication_websites", column: "website_id" + add_foreign_key "communication_website_connections", "universities" add_foreign_key "communication_website_git_files", "communication_websites", column: "website_id" add_foreign_key "communication_website_imported_authors", "communication_website_imported_websites", column: "website_id" add_foreign_key "communication_website_imported_authors", "universities" diff --git a/test/fixtures/communication/extranet/post/categories.yml b/test/fixtures/communication/extranet/post/categories.yml new file mode 100644 index 0000000000000000000000000000000000000000..57dfca8c4e88ad04a255f565215fc80d38df9686 --- /dev/null +++ b/test/fixtures/communication/extranet/post/categories.yml @@ -0,0 +1,35 @@ +# == Schema Information +# +# Table name: communication_extranet_post_categories +# +# id :uuid not null, primary key +# name :string +# slug :string +# created_at :datetime not null +# updated_at :datetime not null +# extranet_id :uuid not null, indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# index_communication_extranet_post_categories_on_extranet_id (extranet_id) +# index_communication_extranet_post_categories_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_aad7b8db63 (university_id => universities.id) +# fk_rails_e53c2a25fc (extranet_id => communication_extranets.id) +# +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + slug: MyString + extranet: one + university: one + +two: + name: MyString + slug: MyString + extranet: two + university: two diff --git a/test/fixtures/communication/extranet/posts.yml b/test/fixtures/communication/extranet/posts.yml index e2637a5ac93300d6819ee7fc690778d81f7e66ae..0221b524146d8f75722e8324a5c00dbb2fe08bbd 100644 --- a/test/fixtures/communication/extranet/posts.yml +++ b/test/fixtures/communication/extranet/posts.yml @@ -13,12 +13,14 @@ # created_at :datetime not null # updated_at :datetime not null # author_id :uuid indexed +# category_id :uuid indexed # extranet_id :uuid not null, indexed # university_id :uuid not null, indexed # # Indexes # # index_communication_extranet_posts_on_author_id (author_id) +# index_communication_extranet_posts_on_category_id (category_id) # index_communication_extranet_posts_on_extranet_id (extranet_id) # index_communication_extranet_posts_on_university_id (university_id) # @@ -26,6 +28,7 @@ # # fk_rails_0232de42a1 (university_id => universities.id) # fk_rails_4341823eab (extranet_id => communication_extranets.id) +# fk_rails_7827da1fd1 (category_id => communication_extranet_post_categories.id) # fk_rails_86cc935add (author_id => university_people.id) # @@ -51,4 +54,4 @@ two: featured_image_alt: MyString featured_image_credit: MyText slug: MyString - summary: MyText \ No newline at end of file + summary: MyText diff --git a/test/models/communication/extranet/post/category_test.rb b/test/models/communication/extranet/post/category_test.rb new file mode 100644 index 0000000000000000000000000000000000000000..34cbc4866024b628fe7a47c7c1ed38abea9ad388 --- /dev/null +++ b/test/models/communication/extranet/post/category_test.rb @@ -0,0 +1,29 @@ +# == Schema Information +# +# Table name: communication_extranet_post_categories +# +# id :uuid not null, primary key +# name :string +# slug :string +# created_at :datetime not null +# updated_at :datetime not null +# extranet_id :uuid not null, indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# index_communication_extranet_post_categories_on_extranet_id (extranet_id) +# index_communication_extranet_post_categories_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_aad7b8db63 (university_id => universities.id) +# fk_rails_e53c2a25fc (extranet_id => communication_extranets.id) +# +require "test_helper" + +class Communication::Extranet::Post::CategoryTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/communication/extranet/post_test.rb b/test/models/communication/extranet/post_test.rb index 7ebb9729226d256d7dcfc1963f0d30598bea7724..91308df6033cd50a8f7cf6c55c58c52bdd224fb0 100644 --- a/test/models/communication/extranet/post_test.rb +++ b/test/models/communication/extranet/post_test.rb @@ -13,12 +13,14 @@ # created_at :datetime not null # updated_at :datetime not null # author_id :uuid indexed +# category_id :uuid indexed # extranet_id :uuid not null, indexed # university_id :uuid not null, indexed # # Indexes # # index_communication_extranet_posts_on_author_id (author_id) +# index_communication_extranet_posts_on_category_id (category_id) # index_communication_extranet_posts_on_extranet_id (extranet_id) # index_communication_extranet_posts_on_university_id (university_id) # @@ -26,6 +28,7 @@ # # fk_rails_0232de42a1 (university_id => universities.id) # fk_rails_4341823eab (extranet_id => communication_extranets.id) +# fk_rails_7827da1fd1 (category_id => communication_extranet_post_categories.id) # fk_rails_86cc935add (author_id => university_people.id) # require "test_helper"