From 5e7ce3756d7aa47166384b213745f0c201e86bad Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Tue, 29 Nov 2022 14:25:27 +0000 Subject: [PATCH] refactor: railsification --- app/controllers/locations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/locations_controller.rb b/app/controllers/locations_controller.rb index 5e847bb27..c2e7bdb11 100644 --- a/app/controllers/locations_controller.rb +++ b/app/controllers/locations_controller.rb @@ -15,7 +15,7 @@ class LocationsController < ApplicationController end def new - @location = Location.new(scheme_id: @scheme.id) + @location = Location.new(scheme: @scheme) @location.save! redirect_to scheme_location_postcode_path(@scheme, @location) end