-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Data Setup
Customer.delete_all
House.delete_all
@vendor = Customer.create!(name: "Test User", email: "[email protected]", phone_number: "123-4567")
@house = House.create!(:vendor => @vendor, :street_number => "8/90", :street_name => "Main Street", :city => "Townsville")
@rooms = [
@house.house_rooms.create!(:name => "Bedroom", :area => 20),
@house.house_rooms.create!(:name => "Bathroom", :area => 16),
]
@room_listing_form = RoomListingForm.new(@house)
Code for reproducing the case
@room_listing_form.update!(:city => "Fancyville", :rooms_attributes => { @rooms.first.id.to_s => { "id" => @rooms.first.id.to_s, "room_name" => "", :area => 9 }}) recue ActiveRecord::RecordInvalid
@room_listing_form.valid? # true
@room_listing_form.rooms.first.valid? # false
@room_listing_form.errors.full_messages # []
@room_listing_form.rooms.first.errors.full_messages # ["Room name can't be blank"]
Metadata
Metadata
Assignees
Labels
No labels