Skip to content

Commit

Permalink
パーシャル内からインスタンス変数を削除
Browse files Browse the repository at this point in the history
  • Loading branch information
Kassy0220 committed Dec 7, 2023
1 parent 0f9a06f commit 81b1ebb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/api/users/companies/_company.json.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ json.logo_url company.logo_url
json.users_url company_users_url(company)

allowed_targets = %w[all trainee adviser graduate mentor]
users = company.users.users_role(@target, allowed_targets: allowed_targets).order(:id)
users = company.users.users_role(target, allowed_targets: allowed_targets).order(:id)
json.users users, partial: "api/users/user", as: :user
2 changes: 1 addition & 1 deletion app/views/api/users/companies/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# frozen_string_literal: true

json.array! @companies, partial: "api/users/companies/company", as: :company
json.array! @companies, partial: "api/users/companies/company", as: :company, target: @target

0 comments on commit 81b1ebb

Please sign in to comment.