diff --git a/app/views/bubbles/_assignment.html.erb b/app/views/bubbles/_assignment.html.erb index 7c6071a25..d28298c02 100644 --- a/app/views/bubbles/_assignment.html.erb +++ b/app/views/bubbles/_assignment.html.erb @@ -3,7 +3,7 @@ Assign this to… - <%= form_with url: bucket_bubble_assignments_path(bubble.bucket, bubble), class: "flex flex-column full-width popup__list", data: { controller: "form" } do |form| %> + <%= form_with url: bubble_assignments_path(bubble), class: "flex flex-column full-width popup__list", data: { controller: "form" } do |form| %> <% bubble.bucket.users.active.sort_by(&:name).each do |user| %> <%= form.check_box "assignee_id[]", { diff --git a/app/views/bubbles/cards/perma/_assignees.html.erb b/app/views/bubbles/cards/perma/_assignees.html.erb index 91f3612a6..8733e969e 100644 --- a/app/views/bubbles/cards/perma/_assignees.html.erb +++ b/app/views/bubbles/cards/perma/_assignees.html.erb @@ -1,3 +1,3 @@ <%= render "bubbles/cards/common/assignees", bubble: bubble do %> - <%= turbo_frame_tag bubble, :assignment, src: new_bucket_bubble_assignment_path(bubble.bucket, bubble) %> + <%= turbo_frame_tag bubble, :assignment, src: new_bubble_assignment_path(bubble) %> <% end %> diff --git a/config/routes.rb b/config/routes.rb index a3ac2ee4a..5157ce9a2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -20,6 +20,7 @@ Rails.application.routes.draw do resources :bubbles do scope module: :bubbles do resource :pin + resources :assignments end end @@ -59,7 +60,6 @@ Rails.application.routes.draw do resource :recover resources :stagings resource :watch - resources :assignments end resources :taggings diff --git a/test/controllers/bubbles/assignments_controller_test.rb b/test/controllers/bubbles/assignments_controller_test.rb index 81156b23e..92583ecc4 100644 --- a/test/controllers/bubbles/assignments_controller_test.rb +++ b/test/controllers/bubbles/assignments_controller_test.rb @@ -6,19 +6,18 @@ class Bubbles::AssignmentsControllerTest < ActionDispatch::IntegrationTest end test "new" do - get new_bucket_bubble_assignment_url(buckets(:writebook), bubbles(:logo)) - + get new_bubble_assignment_url(bubbles(:logo)) assert_response :success end test "create" do assert_changes "bubbles(:logo).assigned_to?(users(:david))", from: false, to: true do - post bucket_bubble_assignments_url(buckets(:writebook), bubbles(:logo)), params: { assignee_id: users(:david).id }, as: :turbo_stream + post bubble_assignments_url(bubbles(:logo)), params: { assignee_id: users(:david).id }, as: :turbo_stream end assert_response :success assert_changes "bubbles(:logo).assigned_to?(users(:david))", from: true, to: false do - post bucket_bubble_assignments_url(buckets(:writebook), bubbles(:logo)), params: { assignee_id: users(:kevin).id }, as: :turbo_stream + post bubble_assignments_url(bubbles(:logo)), params: { assignee_id: users(:kevin).id }, as: :turbo_stream end assert_response :success end