app/controllers/effective/regions_controller.rb in effective_regions-1.4.9 vs app/controllers/effective/regions_controller.rb in effective_regions-1.4.10
- old
+ new
@@ -12,10 +12,12 @@
EffectiveRegions.authorized?(self, :edit, Effective::Region.new())
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'
+ uri = URI.parse(request.url.sub('/edit', ''))
+ uri.query = [uri.query, "edit=true"].compact.join('&')
+ redirect_to uri.to_s
end
def update
refresh_page = false
response = {}