diff --git a/app/controllers/bubbles_controller.rb b/app/controllers/bubbles_controller.rb index dc13cf0cd..17610fc43 100644 --- a/app/controllers/bubbles_controller.rb +++ b/app/controllers/bubbles_controller.rb @@ -25,9 +25,9 @@ class BubblesController < ApplicationController end def create - Bubble.create! bubble_params + @bubble = Bubble.create! bubble_params - redirect_to bubbles_path + redirect_to bubble_path(@bubble) end def show diff --git a/app/views/bubbles/index.html.erb b/app/views/bubbles/index.html.erb index 758874571..4b7e539d7 100644 --- a/app/views/bubbles/index.html.erb +++ b/app/views/bubbles/index.html.erb @@ -17,8 +17,7 @@ <% end %> <% end %> - - <%= link_to new_bubble_path, class: "btn btn--plain flex-item-justify-end" do %> + <%= button_to bubbles_path, method: :post, params: { bubble: { title: "Untitled"} }, class: "btn btn--plain", form_class: "flex-item-justify-end" do %> <%= image_tag "bubble-add.svg", aria: { hidden: true }, size: 24 %> Create a new bubble <% end %>