Resolve bubble to bucket_bubble for ease of redirecting
This commit is contained in:
@@ -3,7 +3,7 @@ class AssignmentsController < ApplicationController
|
||||
|
||||
def create
|
||||
@bubble.assign(find_assignee)
|
||||
redirect_to bucket_bubble_path(@bucket, @bubble)
|
||||
redirect_to @bubble
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -3,6 +3,6 @@ class Bubbles::ImagesController < ApplicationController
|
||||
|
||||
def destroy
|
||||
@bubble.image.purge_later
|
||||
redirect_to bucket_bubble_path(@bubble.bucket, @bubble)
|
||||
redirect_to @bubble
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,11 +3,11 @@ class Bubbles::PopsController < ApplicationController
|
||||
|
||||
def create
|
||||
@bubble.pop!
|
||||
redirect_to bucket_bubble_path(@bubble.bucket, @bubble)
|
||||
redirect_to @bubble
|
||||
end
|
||||
|
||||
def destroy
|
||||
@bubble.unpop
|
||||
redirect_to bucket_bubble_path(@bubble.bucket, @bubble)
|
||||
redirect_to @bubble
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,7 +15,7 @@ class BubblesController < ApplicationController
|
||||
|
||||
def create
|
||||
@bubble = @bucket.bubbles.create!
|
||||
redirect_to bucket_bubble_path(@bucket, @bubble)
|
||||
redirect_to @bubble
|
||||
end
|
||||
|
||||
def show
|
||||
@@ -27,7 +27,7 @@ class BubblesController < ApplicationController
|
||||
|
||||
def update
|
||||
@bubble.update! bubble_params
|
||||
redirect_to bucket_bubble_path(@bucket, @bubble)
|
||||
redirect_to @bubble
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -3,6 +3,6 @@ class CommentsController < ApplicationController
|
||||
|
||||
def create
|
||||
@bubble.comment! params.expect(comment: [ :body ])
|
||||
redirect_to bucket_bubble_path(@bucket, @bubble)
|
||||
redirect_to @bubble
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,7 +13,7 @@ class TagsController < ApplicationController
|
||||
|
||||
def create
|
||||
@bubble.tags << Current.account.tags.find_or_create_by!(tag_params)
|
||||
redirect_to bucket_bubble_path(@bucket, @bubble)
|
||||
redirect_to @bubble
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
||||
@@ -28,6 +28,10 @@ Rails.application.routes.draw do
|
||||
resources :tags, only: :index
|
||||
end
|
||||
|
||||
resolve "Bubble" do |bubble, options|
|
||||
route_for :bucket_bubble, bubble.bucket, bubble, options
|
||||
end
|
||||
|
||||
resource :first_run
|
||||
resource :session
|
||||
|
||||
|
||||
Reference in New Issue
Block a user