Commit 2cd79dfec480a450594d36022c445a4796c240e1

Authored by Antonio Terceiro
1 parent 7a4a4e9b

Redirect to the right place after saving article

For some weird reason, in development mode we were being redirected to a
URL without a port number. Article#url returned with the port number, bur
Article#view_url did not (only in this context, in an automated test it
worked ok).

Since in production mode Noosfero.url_options is guaranteed to return an
empty hash, this has no impact on production servers.
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/controllers/my_profile/cms_controller.rb
... ... @@ -269,7 +269,7 @@ class CmsController < MyProfileController
269 269 if params[:back_to] == 'control_panel'
270 270 redirect_to :controller => 'profile_editor', :profile => @profile.identifier
271 271 elsif params[:back_to] == 'public_view'
272   - redirect_to @article.view_url
  272 + redirect_to @article.view_url.merge(Noosfero.url_options)
273 273 elsif params[:back_to] == 'media_listing'
274 274 redirect_to :action => 'media_listing'
275 275 elsif @article.parent
... ...