Skip to content

Commit

Permalink
#1693 more org urls fixed (III)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartones committed Apr 7, 2015
1 parent 2d4bdce commit 5cbd93e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/controllers/admin/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def account_update
@user.save(raise_on_failure: true)
@user.update_in_central

redirect_to CartoDB.path(self, 'account_user'), flash: { success: "Updated successfully" }
redirect_to CartoDB.url(self, 'account_user', {}, current_user), flash: { success: "Updated successfully" }
rescue CartoDB::CentralCommunicationFailure => e
Rollbar.report_exception(e, params, @user)
flash.now[:error] = "There was a problem while updating your data. Please, try again and contact us if the problem persists"
Expand Down Expand Up @@ -87,7 +87,7 @@ def profile_update
@user.update_in_central
@user.save(raise_on_failure: true)

redirect_to CartoDB.path(self, 'profile_user'), flash: { success: "Updated successfully" }
redirect_to CartoDB.url(self, 'profile_user', {}, current_user), flash: { success: "Updated successfully" }
rescue CartoDB::CentralCommunicationFailure => e
Rollbar.report_exception(e, params, @user)
flash.now[:error] = "There was a problem while updating your data. Please, try again and contact us if the problem persists"
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/organizations/new_settings.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<div class="OrganizationContent">
<div class="u-inner">
<%= form_for @organization, url: CartoDB.path(self, 'organization_settings_update'), multipart: true do |f| %>
<%= form_for @organization, url: CartoDB.url(self, 'organization_settings_update', {}, current_user), multipart: true do |f| %>
<%= csrf_meta_tags %>

<div class="Form-title">
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/organizations/settings.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<%= render partial: "settings_account" %>
<% end %>

<%= form_for @organization, url: CartoDB.path(self, 'organization_settings_update'), multipart: true do |form| %>
<%= form_for @organization, url: CartoDB.url(self, 'organization_settings_update', {}, current_user), multipart: true do |form| %>

<article class="settings">
<div class="inner">
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/users/account.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<div class="CredentialsContent">
<div class="u-inner">
<%= form_for @user, url: CartoDB.path(self, 'account_update_user'), :class => "Form" do |f| %>
<%= form_for @user, url: CartoDB.url(self, 'account_update_user', {}, current_user), :class => "Form" do |f| %>
<%= csrf_meta_tags %>

<div class="Form-title">
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/users/profile.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="CredentialsContent">
<div class="u-inner">

<%= form_for @user, url: CartoDB.path(self, 'profile_update_user', {id: @user.username}) do |f| %>
<%= form_for @user, url: CartoDB.url(self, 'profile_update_user', {id: @user.username}, current_user) do |f| %>
<%= csrf_meta_tags %>

<div class="Form-title">
Expand Down

0 comments on commit 5cbd93e

Please sign in to comment.