From 23704dbae394219501cf852ca4474b93a8ed7bac Mon Sep 17 00:00:00 2001 From: jasder Date: Mon, 10 May 2021 14:38:39 +0800 Subject: [PATCH 1/8] FIX get mirror url bug with get detail repo api --- app/services/repositories/migrate_service.rb | 4 +--- app/views/repositories/detail.json.jbuilder | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/services/repositories/migrate_service.rb b/app/services/repositories/migrate_service.rb index b737b2ef5..374115bf0 100644 --- a/app/services/repositories/migrate_service.rb +++ b/app/services/repositories/migrate_service.rb @@ -21,9 +21,7 @@ class Repositories::MigrateService < ApplicationService private def repository_params - params.merge(project_id: project.id, - identifier: params[:identifier], - source_clone_url: params[:source_clone_url]) + params.merge(project_id: project.id) end def gitea_repository_params diff --git a/app/views/repositories/detail.json.jbuilder b/app/views/repositories/detail.json.jbuilder index 75b474ee0..39f2563a4 100644 --- a/app/views/repositories/detail.json.jbuilder +++ b/app/views/repositories/detail.json.jbuilder @@ -21,7 +21,7 @@ json.versions_count @project.versions_count #里程碑数量 json.version_releases_count @project.releases_size(@user.try(:id), "all") json.version_releasesed_count @project.releases_size(@user.try(:id), "released") #已发行的版本 json.permission render_permission(@user, @project) -json.mirror_url @project&.repository.source_clone_url +json.mirror_url @project&.repository.remote_mirror_url json.mirror @project&.repository.mirror_url.present? json.type @project.numerical_for_project_type json.open_devops @project.open_devops? From 2cca2c756eaccb2635977ee593c93a94f1275062 Mon Sep 17 00:00:00 2001 From: jasder Date: Thu, 13 May 2021 14:52:07 +0800 Subject: [PATCH 2/8] ADD recommend organizations api --- .../organizations/organizations_controller.rb | 9 ++++++++- app/models/organization.rb | 1 + .../organizations/organizations/recommend.json.jbuilder | 6 ++++++ config/routes.rb | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 app/views/organizations/organizations/recommend.json.jbuilder diff --git a/app/controllers/organizations/organizations_controller.rb b/app/controllers/organizations/organizations_controller.rb index c8f4f4aa0..042d9a9fe 100644 --- a/app/controllers/organizations/organizations_controller.rb +++ b/app/controllers/organizations/organizations_controller.rb @@ -1,5 +1,5 @@ class Organizations::OrganizationsController < Organizations::BaseController - before_action :require_login, except: [:index, :show] + before_action :require_login, except: [:index, :show, :recommend] before_action :convert_image!, only: [:create, :update] before_action :load_organization, only: [:show, :update, :destroy] before_action :check_user_can_edit_org, only: [:update, :destroy] @@ -62,6 +62,13 @@ class Organizations::OrganizationsController < Organizations::BaseController tip_exception(e.message) end + def recommend + recommend = %W(xuos Huawei_Technology openatom_foundation pkecosystem TensorLayer) + + @organizations = Organization.with_visibility(%w(common) + .where(nickname: recommend).select(:id, :nickname) + end + private def convert_image! return unless params[:image].present? diff --git a/app/models/organization.rb b/app/models/organization.rb index f12c8b0a6..444938e72 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -47,6 +47,7 @@ # watchers_count :integer default("0") # devops_step :integer default("0") # gitea_token :string(255) +# platform :string(255) # # Indexes # diff --git a/app/views/organizations/organizations/recommend.json.jbuilder b/app/views/organizations/organizations/recommend.json.jbuilder new file mode 100644 index 000000000..262cc23dd --- /dev/null +++ b/app/views/organizations/organizations/recommend.json.jbuilder @@ -0,0 +1,6 @@ +json.organizations @organizations do |organization| + json.id organization.id + json.name organization.login + json.nickname organization.nickname.blank? ? organization.name : organization.nickname + json.avatar_url url_to_avatar(organization) +end \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 2901e0f56..63c7520ae 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -130,6 +130,7 @@ Rails.application.routes.draw do get :search end end + get :recommend, on: :collection end end From c2d7d8289e2ba3c296317bb075b86776d5b86b27 Mon Sep 17 00:00:00 2001 From: jasder Date: Thu, 13 May 2021 14:53:46 +0800 Subject: [PATCH 3/8] FIX dismiss num for recommend projects api --- app/controllers/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 500c584cd..3ddbeb401 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -167,7 +167,7 @@ class ProjectsController < ApplicationController end def recommend - @projects = Project.recommend.includes(:repository, :project_category, :owner).order(id: :desc).limit(5) + @projects = Project.recommend.includes(:repository, :project_category, :owner).order(id: :desc) end def about From fe9201d9f689c43466c398de0f6c4db501e56d35 Mon Sep 17 00:00:00 2001 From: jasder Date: Thu, 13 May 2021 14:56:58 +0800 Subject: [PATCH 4/8] FIX code bug --- app/controllers/organizations/organizations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/organizations/organizations_controller.rb b/app/controllers/organizations/organizations_controller.rb index 042d9a9fe..bce34a5a5 100644 --- a/app/controllers/organizations/organizations_controller.rb +++ b/app/controllers/organizations/organizations_controller.rb @@ -65,7 +65,7 @@ class Organizations::OrganizationsController < Organizations::BaseController def recommend recommend = %W(xuos Huawei_Technology openatom_foundation pkecosystem TensorLayer) - @organizations = Organization.with_visibility(%w(common) + @organizations = Organization.with_visibility(%w(common)) .where(nickname: recommend).select(:id, :nickname) end From e304dd0c9899a98e3eddfd0c0e42cf45a6ad76d4 Mon Sep 17 00:00:00 2001 From: jasder Date: Thu, 13 May 2021 15:02:28 +0800 Subject: [PATCH 5/8] FIX query recommend organization bug --- app/controllers/organizations/organizations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/organizations/organizations_controller.rb b/app/controllers/organizations/organizations_controller.rb index bce34a5a5..a2318f0a7 100644 --- a/app/controllers/organizations/organizations_controller.rb +++ b/app/controllers/organizations/organizations_controller.rb @@ -66,7 +66,7 @@ class Organizations::OrganizationsController < Organizations::BaseController recommend = %W(xuos Huawei_Technology openatom_foundation pkecosystem TensorLayer) @organizations = Organization.with_visibility(%w(common)) - .where(nickname: recommend).select(:id, :nickname) + .where(login: recommend).select(:id, :nickname) end private From b1abac201f5cb8e13c9347d4aeff5362a99c55a5 Mon Sep 17 00:00:00 2001 From: jasder Date: Thu, 13 May 2021 15:06:41 +0800 Subject: [PATCH 6/8] FIX query columns bug with query recommend organization api --- app/controllers/organizations/organizations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/organizations/organizations_controller.rb b/app/controllers/organizations/organizations_controller.rb index a2318f0a7..29cb15a6a 100644 --- a/app/controllers/organizations/organizations_controller.rb +++ b/app/controllers/organizations/organizations_controller.rb @@ -66,7 +66,7 @@ class Organizations::OrganizationsController < Organizations::BaseController recommend = %W(xuos Huawei_Technology openatom_foundation pkecosystem TensorLayer) @organizations = Organization.with_visibility(%w(common)) - .where(login: recommend).select(:id, :nickname) + .where(login: recommend).select(:id, :login, :firstname, :lastname, :nickname) end private From dac07bcae095a8103b3ac1ad211993387671d652 Mon Sep 17 00:00:00 2001 From: jasder Date: Fri, 14 May 2021 16:23:19 +0800 Subject: [PATCH 7/8] =?UTF-8?q?ADD=20=E9=A1=B5=E9=9D=A2=E7=BD=AE=E9=A1=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E3=80=81=E5=B8=AE=E5=8A=A9=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=BF=AB=E9=80=9F=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/javascripts/admins/faqs.js | 2 + app/assets/javascripts/helps/faqs.js | 2 + app/assets/stylesheets/admins/faqs.scss | 3 + app/assets/stylesheets/helps/faqs.scss | 3 + app/controllers/admins/faqs_controller.rb | 58 +++++++++++++++++++ app/controllers/helps/faqs_controller.rb | 8 +++ app/helpers/admins/faqs_helper.rb | 2 + app/helpers/helps/faqs_helper.rb | 2 + app/models/ci/user.rb | 1 + app/models/faq.rb | 20 +++++++ app/models/user.rb | 1 + app/views/admins/faqs/_form_modal.html.erb | 24 ++++++++ app/views/admins/faqs/_list.html.erb | 33 +++++++++++ app/views/admins/faqs/edit.js.erb | 2 + app/views/admins/faqs/index.html.erb | 17 ++++++ app/views/admins/faqs/index.js.erb | 1 + app/views/admins/faqs/new.js.erb | 2 + .../shared/_laboratory_item.html.erb | 1 - app/views/admins/shared/_sidebar.html.erb | 1 + config/routes.rb | 5 ++ db/migrate/20210514024444_create_faqs.rb | 10 ++++ 21 files changed, 197 insertions(+), 1 deletion(-) create mode 100644 app/assets/javascripts/admins/faqs.js create mode 100644 app/assets/javascripts/helps/faqs.js create mode 100644 app/assets/stylesheets/admins/faqs.scss create mode 100644 app/assets/stylesheets/helps/faqs.scss create mode 100644 app/controllers/admins/faqs_controller.rb create mode 100644 app/controllers/helps/faqs_controller.rb create mode 100644 app/helpers/admins/faqs_helper.rb create mode 100644 app/helpers/helps/faqs_helper.rb create mode 100644 app/models/faq.rb create mode 100644 app/views/admins/faqs/_form_modal.html.erb create mode 100644 app/views/admins/faqs/_list.html.erb create mode 100644 app/views/admins/faqs/edit.js.erb create mode 100644 app/views/admins/faqs/index.html.erb create mode 100644 app/views/admins/faqs/index.js.erb create mode 100644 app/views/admins/faqs/new.js.erb create mode 100644 db/migrate/20210514024444_create_faqs.rb diff --git a/app/assets/javascripts/admins/faqs.js b/app/assets/javascripts/admins/faqs.js new file mode 100644 index 000000000..dee720fac --- /dev/null +++ b/app/assets/javascripts/admins/faqs.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/app/assets/javascripts/helps/faqs.js b/app/assets/javascripts/helps/faqs.js new file mode 100644 index 000000000..dee720fac --- /dev/null +++ b/app/assets/javascripts/helps/faqs.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/app/assets/stylesheets/admins/faqs.scss b/app/assets/stylesheets/admins/faqs.scss new file mode 100644 index 000000000..8d1a08d30 --- /dev/null +++ b/app/assets/stylesheets/admins/faqs.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the admins/faqs controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/helps/faqs.scss b/app/assets/stylesheets/helps/faqs.scss new file mode 100644 index 000000000..4d3d2bc49 --- /dev/null +++ b/app/assets/stylesheets/helps/faqs.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the helps/faqs controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/admins/faqs_controller.rb b/app/controllers/admins/faqs_controller.rb new file mode 100644 index 000000000..08dc69a79 --- /dev/null +++ b/app/controllers/admins/faqs_controller.rb @@ -0,0 +1,58 @@ +class Admins::FaqsController < Admins::BaseController + before_action :find_faq, only: [:edit,:update, :destroy] + + def index + sort_by = params[:sort_by] ||= 'created_at' + sort_direction = params[:sort_direction] ||= 'desc' + + keyword = params[:keyword].to_s.strip + collection = Faq.search_question(keyword).order("#{sort_by} #{sort_direction}") + @faqs = paginate collection + end + + def new + @faq = Faq.new + end + + def edit + end + + def update + begin + @faq.update!(faq_params) + flash[:success] = '修改成功' + rescue Exception + flash[:danger] = @faq.errors.full_messages.to_sentence + end + + redirect_to admins_faqs_path + end + + def destroy + @faq.destroy + + redirect_to admins_faqs_path + flash[:success] = "删除成功" + end + + def create + @faq = Faq.new(faq_params) + begin + @faq.save! + flash[:success] = '创建成功' + rescue Exception + flash[:danger] = @faq.errors.full_messages.to_sentence + end + redirect_to admins_faqs_path + end + + private + def find_faq + @faq = Faq.find params[:id] + end + + def faq_params + params.require(:faq).permit(:question, :url) + end + +end diff --git a/app/controllers/helps/faqs_controller.rb b/app/controllers/helps/faqs_controller.rb new file mode 100644 index 000000000..133748ed5 --- /dev/null +++ b/app/controllers/helps/faqs_controller.rb @@ -0,0 +1,8 @@ +class Helps::FaqsController < ApplicationController + skip_before_action :check_sign, :user_setup + + def index + faqs = Faq.select_without_id + render json: faqs.as_json(:except => [:id]) + end +end diff --git a/app/helpers/admins/faqs_helper.rb b/app/helpers/admins/faqs_helper.rb new file mode 100644 index 000000000..0316d44fd --- /dev/null +++ b/app/helpers/admins/faqs_helper.rb @@ -0,0 +1,2 @@ +module Admins::FaqsHelper +end diff --git a/app/helpers/helps/faqs_helper.rb b/app/helpers/helps/faqs_helper.rb new file mode 100644 index 000000000..68b8279f7 --- /dev/null +++ b/app/helpers/helps/faqs_helper.rb @@ -0,0 +1,2 @@ +module Helps::FaqsHelper +end diff --git a/app/models/ci/user.rb b/app/models/ci/user.rb index fc82596c4..e4a4d0623 100644 --- a/app/models/ci/user.rb +++ b/app/models/ci/user.rb @@ -47,6 +47,7 @@ # watchers_count :integer default("0") # devops_step :integer default("0") # gitea_token :string(255) +# platform :string(255) # # Indexes # diff --git a/app/models/faq.rb b/app/models/faq.rb new file mode 100644 index 000000000..5965de036 --- /dev/null +++ b/app/models/faq.rb @@ -0,0 +1,20 @@ +# == Schema Information +# +# Table name: faqs +# +# id :integer not null, primary key +# question :string(255) +# url :string(255) +# created_at :datetime not null +# updated_at :datetime not null +# + +class Faq < ApplicationRecord + + validates :question, presence: true,length: { maximum: 100, too_long: "最多%{count}个字符" } + validates :url, format: { with: CustomRegexp::URL, multiline: true, message: "格式不正确" } + + scope :select_without_id, -> { select(:question, :url) } + scope :search_question, ->(keyword) { where("question LIKE ?", "%#{keyword}%") unless keyword.blank?} + +end diff --git a/app/models/user.rb b/app/models/user.rb index 256cc7b41..2f67410c0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -47,6 +47,7 @@ # watchers_count :integer default("0") # devops_step :integer default("0") # gitea_token :string(255) +# platform :string(255) # # Indexes # diff --git a/app/views/admins/faqs/_form_modal.html.erb b/app/views/admins/faqs/_form_modal.html.erb new file mode 100644 index 000000000..45ceb901c --- /dev/null +++ b/app/views/admins/faqs/_form_modal.html.erb @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/app/views/admins/faqs/_list.html.erb b/app/views/admins/faqs/_list.html.erb new file mode 100644 index 000000000..81e658edd --- /dev/null +++ b/app/views/admins/faqs/_list.html.erb @@ -0,0 +1,33 @@ + + + + + + + + + + + + + <% if faqs.present? %> + <% faqs.each_with_index do |faq, index| %> + + + + + + + + + <% end %> + <% else %> + <%= render 'admins/shared/no_data_for_table' %> + <% end %> + +
序号标题url<%= sort_tag('创建于', name: 'created_at', path: admins_faqs_path) %><%= sort_tag('更新于', name: 'updated_at', path: admins_faqs_path) %>操作
<%= list_index_no((params[:page] || 1).to_i, index) %><%= faq.question%><%= link_to faq.url, target: '_blank' %><%= display_text(faq.created_at&.strftime('%Y-%m-%d %H:%M')) %><%= display_text(faq.updated_at&.strftime('%Y-%m-%d %H:%M')) %> + <%= link_to "编辑", edit_admins_faq_path(faq), remote: true, class: "action" %> + <%= link_to "删除", admins_faqs_path(faq.id), method: :delete, data:{confirm: "确认删除的吗?"}, class: "delete-project-action" %> +
+ +<%= render partial: 'admins/shared/paginate', locals: { objects: faqs } %> diff --git a/app/views/admins/faqs/edit.js.erb b/app/views/admins/faqs/edit.js.erb new file mode 100644 index 000000000..fc121b18e --- /dev/null +++ b/app/views/admins/faqs/edit.js.erb @@ -0,0 +1,2 @@ +$("#faq-modals").html("<%= j render(partial: 'admins/faqs/form_modal', locals: {type: 'update'}) %>") +$(".faq-change-modal").modal('show'); \ No newline at end of file diff --git a/app/views/admins/faqs/index.html.erb b/app/views/admins/faqs/index.html.erb new file mode 100644 index 000000000..3b327249b --- /dev/null +++ b/app/views/admins/faqs/index.html.erb @@ -0,0 +1,17 @@ +<% define_admin_breadcrumbs do %> + <% add_admin_breadcrumb('FAQ', admins_faqs_path) %> +<% end %> + +
+ <%= form_tag(admins_faqs_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %> + <%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '输入标题搜素') %> + <%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %> + <% end %> + <%= link_to "新增", new_admins_faq_path, remote: true, class: "btn btn-primary pull-right", "data-disabled-with":"...新增" %> +
+ +
+ <%= render partial: 'admins/faqs/list', locals: { faqs: @faqs } %> +
+
+
\ No newline at end of file diff --git a/app/views/admins/faqs/index.js.erb b/app/views/admins/faqs/index.js.erb new file mode 100644 index 000000000..ebb1900e5 --- /dev/null +++ b/app/views/admins/faqs/index.js.erb @@ -0,0 +1 @@ +$('.faqs-list-container').html("<%= j( render partial: 'admins/faqs/list', locals: { faqs: @faqs } ) %>"); \ No newline at end of file diff --git a/app/views/admins/faqs/new.js.erb b/app/views/admins/faqs/new.js.erb new file mode 100644 index 000000000..edeb83a81 --- /dev/null +++ b/app/views/admins/faqs/new.js.erb @@ -0,0 +1,2 @@ +$("#faq-modals").html("<%= j render(partial: 'admins/faqs/form_modal', locals: {type: 'create'}) %>") +$(".faq-change-modal").modal('show'); \ No newline at end of file diff --git a/app/views/admins/laboratories/shared/_laboratory_item.html.erb b/app/views/admins/laboratories/shared/_laboratory_item.html.erb index 8fdf9c727..a121528e3 100644 --- a/app/views/admins/laboratories/shared/_laboratory_item.html.erb +++ b/app/views/admins/laboratories/shared/_laboratory_item.html.erb @@ -10,7 +10,6 @@ <% if school && school.identifier.present? %> - <%= link_to school.identifier.to_s, statistics_college_path(school.identifier), target: '_blank' %> <% else %> -- <% end %> diff --git a/app/views/admins/shared/_sidebar.html.erb b/app/views/admins/shared/_sidebar.html.erb index de56a5477..ad53c661a 100644 --- a/app/views/admins/shared/_sidebar.html.erb +++ b/app/views/admins/shared/_sidebar.html.erb @@ -38,6 +38,7 @@
  • <%= sidebar_item(admins_cooperatives_path, '合作伙伴', icon: 'handshake-o', controller: 'admins-cooperatives') %>
  • <%= sidebar_item(edit_admins_agreement_path, '服务协议', icon: 'file-text-o', controller: 'admins-agreements') %>
  • <%= sidebar_item(edit_admins_help_center_path, '帮助中心', icon: 'question-circle-o', controller: 'admins-help_centers') %>
  • +
  • <%= sidebar_item(admins_faqs_path, 'FAQ', icon: 'question-circle', controller: 'admins-faqs') %>
  • <% end %>
  • diff --git a/config/routes.rb b/config/routes.rb index 63c7520ae..a8c97effc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -604,6 +604,10 @@ Rails.application.routes.draw do end end # Project Area END + + scope module: :helps do + resources :faqs, only: [:index] + end end namespace :admins do @@ -780,6 +784,7 @@ Rails.application.routes.draw do post :drag, on: :collection post :replace_image_url, on: :member end + resources :faqs resources :laboratories, only: [:index, :create, :destroy, :update] do member do get :shixuns_for_select diff --git a/db/migrate/20210514024444_create_faqs.rb b/db/migrate/20210514024444_create_faqs.rb new file mode 100644 index 000000000..d63a64fa2 --- /dev/null +++ b/db/migrate/20210514024444_create_faqs.rb @@ -0,0 +1,10 @@ +class CreateFaqs < ActiveRecord::Migration[5.2] + def change + create_table :faqs do |t| + t.string :question + t.string :url + + t.timestamps + end + end +end From 8ee0acae85e8d40c5652fd3791848c26ee268b5a Mon Sep 17 00:00:00 2001 From: jasder Date: Fri, 14 May 2021 16:39:32 +0800 Subject: [PATCH 8/8] set default desc sort for faqs api --- app/controllers/admins/faqs_controller.rb | 2 +- app/controllers/helps/faqs_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/admins/faqs_controller.rb b/app/controllers/admins/faqs_controller.rb index 08dc69a79..fc00f847c 100644 --- a/app/controllers/admins/faqs_controller.rb +++ b/app/controllers/admins/faqs_controller.rb @@ -2,7 +2,7 @@ class Admins::FaqsController < Admins::BaseController before_action :find_faq, only: [:edit,:update, :destroy] def index - sort_by = params[:sort_by] ||= 'created_at' + sort_by = params[:sort_by] ||= 'updated_at' sort_direction = params[:sort_direction] ||= 'desc' keyword = params[:keyword].to_s.strip diff --git a/app/controllers/helps/faqs_controller.rb b/app/controllers/helps/faqs_controller.rb index 133748ed5..a18f49270 100644 --- a/app/controllers/helps/faqs_controller.rb +++ b/app/controllers/helps/faqs_controller.rb @@ -2,7 +2,7 @@ class Helps::FaqsController < ApplicationController skip_before_action :check_sign, :user_setup def index - faqs = Faq.select_without_id + faqs = Faq.select_without_id.order(updated_at: :desc) render json: faqs.as_json(:except => [:id]) end end