-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐞
Space
: Fix broken SpacesController#new
action
- #1154 - #1161 - #1141 Deleting the `Client` was great! But when we merged the `Neighborhood` first-run PR, we still had the `Client#name` field; which no longer exists. So now there's two tests for the `SpacesController#new` action: - 1 to catch any errors in the happy-path request/response cycle - 1 to make sure `Guest`s cant create a Space
- Loading branch information
Showing
3 changed files
with
56 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
<%= form_with(model: space) do |form| %> | ||
<%= render "text_field", attribute: :name, form: form %> | ||
<%= form.fields_for(:client, space.client || space.build_client) do |client_form|%> | ||
<%= render "text_field", attribute: :name, form: client_form %> | ||
<%- end %> | ||
<%= form.submit %> | ||
<%- end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters