[openstreetmap-website] Move param-based map configuration to client (#94)

Tom Hughes notifications at github.com
Sun Sep 16 17:05:55 BST 2012


> @@ -21,6 +21,14 @@
>      I18n.defaultLocale = "<%= I18n.default_locale %>";
>      I18n.locale = "<%= I18n.locale %>";
>      I18n.fallbacks = true;
> +
> +    <% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
> +    OSM.home = <%= { :lat => @user.home_lat, :lon => @user.home_lon }.to_json %>;

This needs a `.html_safe` after the `.to_json` or the javascript code gets HTML escaped. The same will apply to the other one.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/94/files#r1614759
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20120916/985885b7/attachment.html>


More information about the rails-dev mailing list