From 654ce95db4dccaeafebd883c52fe13d339fee419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Sun, 21 Nov 2010 12:16:52 +0100 Subject: [PATCH] Use javascript helper method in view instead, instead of hardwired path. Balder can be run as a sub path of another site. This require the use of rails helper method to take care of the needed path modification. It's also useful for using asset hosts. --- app/views/albums/_form.html.erb | 4 ++-- app/views/photos/_form.html.erb | 2 +- app/views/photos/upload.html.erb | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/albums/_form.html.erb b/app/views/albums/_form.html.erb index bf83b9b..5c2c804 100644 --- a/app/views/albums/_form.html.erb +++ b/app/views/albums/_form.html.erb @@ -1,6 +1,6 @@ <% content_for :javascript do %> - - +<%= javascript_include_tag "http://maps.google.com/maps/api/js?sensor=true" -%> +<%= javascript_include_tag "tag/tag" -%> <% end %>
diff --git a/app/views/photos/_form.html.erb b/app/views/photos/_form.html.erb index b0cffdb..b087a6c 100644 --- a/app/views/photos/_form.html.erb +++ b/app/views/photos/_form.html.erb @@ -1,5 +1,5 @@ <% content_for :javascript do %> - +<%= javascript_include_tag "tag/tag" -%> <% end %> <%= hidden_field_tag :all_tags, @tags %> <%= form.label :title %>
diff --git a/app/views/photos/upload.html.erb b/app/views/photos/upload.html.erb index 04341a3..4f530c3 100644 --- a/app/views/photos/upload.html.erb +++ b/app/views/photos/upload.html.erb @@ -1,11 +1,11 @@ <% content_for :javascript do %> - - +<%= javascript_include_tag "uploadify-2.1/jquery.uploadify.v2.1.0.min.js" -%> +<%= javascript_include_tag "uploadify-2.1/swfobject.js" -%>