mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Fix property subtype not persisting on edit (#930)
* Fix property subtype not persisting on edit * Add regression test for property subtype persistence This change introduces model specs and factories to cover property subtype persistence on update. FactoryBot setup and test dependencies were adjusted to support the new specs. * Add regression test for property subtype persistence * remove unused FactoryBot factories and test * remove FactoryBot in Gemfile.lock * Fix no-op regression test for property subtype update * Delete no-op property_test * add pimary_residence in properties fixtures * add capybara system test for property subtype persistence * fix spelling and indent * rename test to "can persist property subtype" Signed-off-by: HugoleDino <135261771+HugoleDino@users.noreply.github.com> --------- Signed-off-by: HugoleDino <135261771+HugoleDino@users.noreply.github.com>
This commit is contained in:
@@ -6,13 +6,14 @@
|
||||
placeholder: "Vacation home",
|
||||
required: true %>
|
||||
|
||||
<%= form.select :subtype,
|
||||
Property::SUBTYPES.map { |k, v| [v[:long], k] },
|
||||
{ prompt: "Select type", label: "Property type" }, required: true %>
|
||||
|
||||
|
||||
<%= form.hidden_field :accountable_type, value: "Property" %>
|
||||
|
||||
<%= form.fields_for :accountable do |property_form| %>
|
||||
<%= property_form.select :subtype,
|
||||
Property::SUBTYPES.map { |k, v| [v[:long], k] },
|
||||
{ prompt: "Select type", label: "Property type" }, required: true %>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<%= property_form.number_field :year_built,
|
||||
label: "Year Built (optional)",
|
||||
|
||||
Reference in New Issue
Block a user