Skip to content

Commit

Permalink
BYO Domains: (WIP) Identify a few places where things are shady
Browse files Browse the repository at this point in the history
We probably want to figure out a better strategy for how we test the BYO
domains feature; perhaps there's a way to do it with the end-to-end
tests so that they run against a BYO-domained Space and a non-BYO
domained space in different github actions? I don't know 🤷

#74
  • Loading branch information
zspencer committed Jan 30, 2023
1 parent 24bfef9 commit 8b845fd
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/views/furniture_placements/_new.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<fieldset id="new_furniture_placement">
<h3><%= t('rooms.place_furniture_heading') %></h3>
<%= form_with model: [furniture_placement.room.space, furniture_placement.room, furniture_placement] do | placement_form | %>
<%= form_with model: furniture_placement.location do | placement_form | %>
<%= placement_form.hidden_field :slot, value: furniture_placement.room.furniture_placements.count %>
<%= placement_form.select :furniture_kind, Furniture::REGISTRY.keys.map { |k| [k.to_s.titleize, k] } %>
<footer>
<%= placement_form.submit %>
</footer>
<%- end %>
</fieldset>
</fieldset>
2 changes: 1 addition & 1 deletion app/views/rooms/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= form_with model: [room.space, room], data: { controller: "room-form" }, local: true do |room_form| %>
<%= form_with model: room.location, data: { controller: "room-form" } do |room_form| %>
<fieldset>
<div>
<%= room_form.label :name %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/rsvps/_pending.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
[rsvp.space, rsvp.invitation, rsvp],
params: { rsvp: { status: 'ignored' } },
data: {testid: 'ignore' },
class: '--neutral w-full' %>
class: '--neutral w-full' %>
2 changes: 1 addition & 1 deletion app/views/spaces/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</fieldset>

<fieldset>
<%= form_with(model: [space]) do |space_form| %>
<%= form_with(model: space.location) do |space_form| %>
<%= render "select",
attribute: :theme,
include_blank: false,
Expand Down
2 changes: 1 addition & 1 deletion app/views/utility_hookups/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= form_with(model: [space, utility_hookup]) do |form| %>
<%= form_with(model: utility_hookup.location) do |form| %>
<%- form.object = form.object.utility %>
<%= form.hidden_field :utility_slug %>
<header>
Expand Down
2 changes: 1 addition & 1 deletion app/views/utility_hookups/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%- breadcrumb :new_utility_hookup, utility_hookup %>
<%= form_with(model: [utility_hookup.space, utility_hookup], local: true) do |form| %>
<%= form_with(model: utility_hookup.location) do |form| %>
<%= render "select", attribute: :utility_slug, options: Utilities::REGISTRY.keys, form: form %>
<%= render "text_field", attribute: :name, form: form %>
<%= form.submit %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/waiting_rooms/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
</div>

<%= form_with model: [waiting_room.room.space, waiting_room.room, waiting_room], class: "access-code-form", local: true do |form| %>
<%= form_with model: waiting_room.location, class: "access-code-form", local: true do |form| %>
<%= render "password_field", form: form, attribute: :access_code%>

<%= form.hidden_field :redirect_url %>
Expand Down

0 comments on commit 8b845fd

Please sign in to comment.