Create new bubbles automatically and land on the perma
...so we don't have to deal with a separate create state
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
</h1>
|
||||
|
||||
<%= 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 %>
|
||||
<span class="for-screen-reader">Create a new bubble</span>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user