revert changes on home controller
This commit is contained in:
parent
afd82a4901
commit
54e11dc838
1 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ class HomeController < ApplicationController
|
||||||
@bank_accounts = @types.includes(:bank_account).map(&:bank_account).uniq.compact
|
@bank_accounts = @types.includes(:bank_account).map(&:bank_account).uniq.compact
|
||||||
@bank_accounts = [BankAccount.last] if @bank_accounts.empty?
|
@bank_accounts = [BankAccount.last] if @bank_accounts.empty?
|
||||||
else
|
else
|
||||||
redirect_to root_path, alert: I18n.t('group_orders.errors.no_member')
|
redirect_to root_url, alert: I18n.t('group_orders.errors.no_member')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class HomeController < ApplicationController
|
||||||
if @current_user.update(user_params)
|
if @current_user.update(user_params)
|
||||||
@current_user.ordergroup.update(ordergroup_params) if ordergroup_params
|
@current_user.ordergroup.update(ordergroup_params) if ordergroup_params
|
||||||
session[:locale] = @current_user.locale
|
session[:locale] = @current_user.locale
|
||||||
redirect_to my_profile_path, notice: I18n.t('home.changes_saved')
|
redirect_to my_profile_url, notice: I18n.t('home.changes_saved')
|
||||||
else
|
else
|
||||||
render :profile
|
render :profile
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue