diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index ffd1a7134f0..94e9bbe38af 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -25,7 +25,7 @@ def list def new @account = Account.new( balance: nil, - accountable: Accountable.from_type(params[:type])&.new, + accountable: Accountable.from_type(params[:type])&.new ) if params[:institution_id] diff --git a/app/controllers/institutions_controller.rb b/app/controllers/institutions_controller.rb index 482e437bf1f..92e9e63d11e 100644 --- a/app/controllers/institutions_controller.rb +++ b/app/controllers/institutions_controller.rb @@ -7,7 +7,7 @@ def new def create Current.family.institutions.create!(institution_params) - redirect_to accounts_path, notice: "Institution created" + redirect_to accounts_path, notice: t(".success") end def edit @@ -15,12 +15,12 @@ def edit def update @institution.update!(institution_params) - redirect_to accounts_path, notice: "Institution updated" + redirect_to accounts_path, notice: t(".success") end def destroy @institution.destroy! - redirect_to accounts_path, notice: "Institution deleted" + redirect_to accounts_path, notice: t(".success") end private diff --git a/app/views/accounts/_institution_accounts.html.erb b/app/views/accounts/_institution_accounts.html.erb index d7c03bd586d..ee50e3bbf89 100644 --- a/app/views/accounts/_institution_accounts.html.erb +++ b/app/views/accounts/_institution_accounts.html.erb @@ -26,7 +26,6 @@ <%= t(".add_account_to_institution") %> <% end %> - <%= link_to edit_institution_path(institution), class: "block w-full py-2 px-3 space-x-2 text-gray-900 hover:bg-gray-50 flex items-center rounded-lg", data: { turbo_frame: :modal } do %> diff --git a/config/locales/views/institutions/en.yml b/config/locales/views/institutions/en.yml index ba106aa97c7..2499b171491 100644 --- a/config/locales/views/institutions/en.yml +++ b/config/locales/views/institutions/en.yml @@ -7,3 +7,9 @@ en: name: Financial institution name new: new_institution: New financial institution + create: + success: "Institution created" + update: + success: "Institution updated" + destroy: + success: "Institution deleted"