app/controllers/effective/regions_controller.rb in effective_regions-1.2.0 vs app/controllers/effective/regions_controller.rb in effective_regions-1.2.1
- old
+ new
@@ -9,10 +9,10 @@
skip_before_filter :verify_authenticity_token, :only => [:update]
def edit
EffectiveRegions.authorized?(self, :edit, Effective::Region.new())
- cookies['effective_regions_editting'] = {:value => request.referrer, :path => '/'}
+ cookies['effective_regions_editting'] = {:value => params[:exit].presence || request.referrer, :path => '/'}
# TODO: turn this into a cookie or something better.
redirect_to request.url.gsub('/edit', '') + '?edit=true'
end