diff --git a/app/controllers/country_states_controller.rb b/app/controllers/countries_states_controller.rb similarity index 71% rename from app/controllers/country_states_controller.rb rename to app/controllers/countries_states_controller.rb index 9a9484ec6..096a7c4fb 100644 --- a/app/controllers/country_states_controller.rb +++ b/app/controllers/countries_states_controller.rb @@ -1,4 +1,4 @@ -class CountryStatesController < ApplicationController +class CountriesStatesController < ApplicationController skip_before_action :authenticate_user! skip_verify_authorized only: %i[index] @@ -8,7 +8,7 @@ def index @name = params[:name] @selected_state = params[:province_state] - @states = CS[country.to_sym][:states].invert + @states = COUNTRIES_STATES[country.to_sym][:states].invert respond_to do |format| format.turbo_stream diff --git a/app/controllers/organizations/staff/organizations_controller.rb b/app/controllers/organizations/staff/organizations_controller.rb index ac8a497d2..0f92ef0b3 100644 --- a/app/controllers/organizations/staff/organizations_controller.rb +++ b/app/controllers/organizations/staff/organizations_controller.rb @@ -6,6 +6,7 @@ class OrganizationsController < Organizations::BaseController before_action :set_organization, only: %i[edit update] def edit + @location = @organization.locations.last || @organization.locations.build # polymorphic end def update diff --git a/app/views/country_states/index.turbo_stream.erb b/app/views/countries_states/index.turbo_stream.erb similarity index 100% rename from app/views/country_states/index.turbo_stream.erb rename to app/views/countries_states/index.turbo_stream.erb diff --git a/app/views/organizations/staff/organizations/_form.html.erb b/app/views/organizations/staff/organizations/_form.html.erb index 6ce2493b1..0e808198e 100644 --- a/app/views/organizations/staff/organizations/_form.html.erb +++ b/app/views/organizations/staff/organizations/_form.html.erb @@ -39,9 +39,8 @@