app/controllers/iugu/account_controller.rb in iugusdk-1.0.0.alpha.2 vs app/controllers/iugu/account_controller.rb in iugusdk-1.0.0.alpha.3
- old
+ new
@@ -35,21 +35,23 @@
end
def update
@account = Account.find(params[:id])
@account.update_attributes(params[:account])
+ flash[:group] = :account_update
redirect_to account_view_path(params[:id]), :notice => I18n.t("iugu.notices.account_updated")
end
def create
current_user.accounts << Account.create
redirect_to account_settings_path
end
def generate_new_token
- if IuguSDK::enable_account_api_token == true
+ if IuguSDK::enable_account_api
@account = current_user.accounts.find(params[:account_id])
@account.update_api_token
+ flash[:group] = :api_token
redirect_to account_view_path(params[:account_id]), :notice => I18n.t("iugu.notices.new_token_generated")
else
raise ActionController::RoutingError.new('Not found')
end