From 6659fb9b33503ee6519f89131a8a4b5fef515bcd Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 7 May 2013 14:50:31 +0100 Subject: [PATCH] Rename the ugly "id_iframe" to just plain "id" --- app/controllers/site_controller.rb | 4 ++-- app/views/site/_id.html.erb | 2 +- app/views/site/{id_iframe.html.erb => id.html.erb} | 0 config/routes.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename app/views/site/{id_iframe.html.erb => id.html.erb} (100%) 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 -- 2.43.2