Move readings under bubbles and out of double nesting
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
class ReadingsController < ApplicationController
|
||||
class Bubbles::ReadingsController < ApplicationController
|
||||
include BubbleScoped
|
||||
|
||||
def create
|
||||
@@ -51,7 +51,7 @@
|
||||
</nav>
|
||||
<% end %>
|
||||
|
||||
<div data-controller="beacon" data-beacon-url-value="<%= bucket_bubble_readings_url(@bubble.bucket, @bubble) %>">
|
||||
<div data-controller="beacon" data-beacon-url-value="<%= bubble_reading_url(@bubble) %>">
|
||||
<div class="card__container position-relative <%= "card__container--pointing" unless @bubble.published? %>" style="--bubble-color: <%= @bubble.color %>;">
|
||||
<%= render "bubbles/cards/perma", bubble: @bubble %>
|
||||
|
||||
|
||||
+1
-4
@@ -15,6 +15,7 @@ Rails.application.routes.draw do
|
||||
resource :pin
|
||||
resource :pop
|
||||
resource :publish
|
||||
resource :reading
|
||||
resource :recover
|
||||
resource :watch
|
||||
|
||||
@@ -50,10 +51,6 @@ Rails.application.routes.draw do
|
||||
resources :comments do
|
||||
resources :reactions, module: :comments
|
||||
end
|
||||
resource :readings, only: :create
|
||||
|
||||
scope module: :bubbles do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+2
-2
@@ -1,13 +1,13 @@
|
||||
require "test_helper"
|
||||
|
||||
class ReadingsControllerTest < ActionDispatch::IntegrationTest
|
||||
class Bubbles::ReadingsControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in_as :kevin
|
||||
end
|
||||
|
||||
test "index" do
|
||||
assert_changes -> { notifications(:logo_published_kevin).reload.read? }, from: false, to: true do
|
||||
post bucket_bubble_readings_url(bubbles(:logo).bucket, bubbles(:logo)), as: :turbo_stream
|
||||
post bubble_reading_url(bubbles(:logo)), as: :turbo_stream
|
||||
end
|
||||
|
||||
assert_response :success
|
||||
Reference in New Issue
Block a user