rubocop: style fixes
This commit is contained in:
@@ -18,8 +18,8 @@ module Searchable
|
|||||||
|
|
||||||
def update_in_search_index
|
def update_in_search_index
|
||||||
Search::Record.for_account(account_id).upsert_all(
|
Search::Record.for_account(account_id).upsert_all(
|
||||||
[search_record_attributes.merge(id: ActiveRecord::Type::Uuid.generate)],
|
[ search_record_attributes.merge(id: ActiveRecord::Type::Uuid.generate) ],
|
||||||
update_only: [:card_id, :board_id, :title, :content, :created_at]
|
update_only: [ :card_id, :board_id, :title, :content, :created_at ]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -43,10 +43,10 @@ module Searchable
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
# Models must implement these methods:
|
# Models must implement these methods:
|
||||||
# - account_id: returns the account id
|
# - account_id: returns the account id
|
||||||
# - search_title: returns title string or nil
|
# - search_title: returns title string or nil
|
||||||
# - search_content: returns content string
|
# - search_content: returns content string
|
||||||
# - search_card_id: returns the card id (self.id for cards, card_id for comments)
|
# - search_card_id: returns the card id (self.id for cards, card_id for comments)
|
||||||
# - search_board_id: returns the board id
|
# - search_board_id: returns the board id
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class Search::Record < ApplicationRecord
|
|||||||
|
|
||||||
scope :search, ->(query:, user:) do
|
scope :search, ->(query:, user:) do
|
||||||
for_query(query: query, user: user)
|
for_query(query: query, user: user)
|
||||||
.includes(:searchable, card: [:board, :creator])
|
.includes(:searchable, card: [ :board, :creator ])
|
||||||
.select(:id, :searchable_type, :searchable_id, :card_id, :board_id, :account_id, :created_at, "#{connection.quote(query.terms)} AS query")
|
.select(:id, :searchable_type, :searchable_id, :card_id, :board_id, :account_id, :created_at, "#{connection.quote(query.terms)} AS query")
|
||||||
.order(created_at: :desc)
|
.order(created_at: :desc)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class Signup::CompletionsControllerTest < ActionDispatch::IntegrationTest
|
|||||||
untenanted do
|
untenanted do
|
||||||
post saas.signup_completion_path, params: {
|
post saas.signup_completion_path, params: {
|
||||||
signup: {
|
signup: {
|
||||||
full_name: @signup.full_name,
|
full_name: @signup.full_name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@@ -33,7 +33,7 @@ class Signup::CompletionsControllerTest < ActionDispatch::IntegrationTest
|
|||||||
untenanted do
|
untenanted do
|
||||||
post saas.signup_completion_path, params: {
|
post saas.signup_completion_path, params: {
|
||||||
signup: {
|
signup: {
|
||||||
full_name: "",
|
full_name: ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user