- referer_params = Rack::Utils.parse_query(URI(session[:referer]).query)
- referer = welcome_path(referer_params.slice(:lat, :lon, :zoom, :editor))
+ uri = URI(session[:referer])
+ /map=(.*)\/(.*)\/(.*)/.match(uri.fragment) do |m|
+ editor = Rack::Utils.parse_query(uri.query).slice('editor')
+ referer = welcome_path({'zoom' => m[1],
+ 'lat' => m[2],
+ 'lon' => m[3]}.merge(editor))
+ end