From: Tom Hughes Date: Tue, 7 May 2013 13:50:31 +0000 (+0100) Subject: Rename the ugly "id_iframe" to just plain "id" X-Git-Tag: live~5017 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6659fb9b33503ee6519f89131a8a4b5fef515bcd Rename the ugly "id_iframe" to just plain "id" --- diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 744b65399..0e26185a1 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -66,7 +66,7 @@ class SiteController < ApplicationController render :text => RichText.new(params[:format], params[:text]).to_html end - def id_iframe - render "id_iframe", :layout => false + def id + render "id", :layout => false end end diff --git a/app/views/site/_id.html.erb b/app/views/site/_id.html.erb index c31ea23dc..fe9d569aa 100644 --- a/app/views/site/_id.html.erb +++ b/app/views/site/_id.html.erb @@ -19,7 +19,7 @@ hash = '#map=' + (coord.zoom || 17) + '/' + coord.lon + '/' + coord.lat } - $('#id-embed').attr('src', 'id_iframe' + hash); + $('#id-embed').attr('src', '<%= id_url %>' + hash); <% else %> diff --git a/app/views/site/id_iframe.html.erb b/app/views/site/id.html.erb similarity index 100% rename from app/views/site/id_iframe.html.erb rename to app/views/site/id.html.erb diff --git a/config/routes.rb b/config/routes.rb index 99dca52ff..f53f20861 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -131,7 +131,7 @@ OpenStreetMap::Application.routes.draw do match '/logout' => 'user#logout', :via => [:get, :post] match '/offline' => 'site#offline', :via => :get match '/key' => 'site#key', :via => :get - match '/id_iframe' => 'site#id_iframe', :via => :get + match '/id' => 'site#id', :via => :get match '/user/new' => 'user#new', :via => :get match '/user/terms' => 'user#terms', :via => [:get, :post] match '/user/save' => 'user#save', :via => :post