aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMark Longair <mhl@pobox.com>2013-11-11 16:03:28 +0000
committerMark Longair <mhl@pobox.com>2013-11-11 16:03:28 +0000
commitfad18e417eda9cf25d1abb38d9555cd26d6d9cac (patch)
treec6dd4275098d5ac8f2e13b4e42977db8dfe1461f /lib
parent88f5008401ac0456306bf957aa0df325684e51cf (diff)
Switch to work with the feature/wip-switch-to-asset-pipeline branch
Diffstat (limited to 'lib')
-rw-r--r--lib/alavetelitheme.rb9
-rw-r--r--lib/views/general/_before_head_end.html.erb2
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/alavetelitheme.rb b/lib/alavetelitheme.rb
index 2930ba6..8476e90 100644
--- a/lib/alavetelitheme.rb
+++ b/lib/alavetelitheme.rb
@@ -32,6 +32,15 @@ end
# something unique (e.g. yourtheme-custom-routes.rb":
$alaveteli_route_extensions << 'custom-routes.rb'
+# Prepend the asset directories in this theme to the asset path:
+['stylesheets', 'images', 'javascripts'].each do |asset_type|
+ theme_asset_path = File.join(File.dirname(__FILE__),
+ '..',
+ 'assets',
+ asset_type)
+ Rails.application.config.assets.paths.unshift theme_asset_path
+end
+
# Tell FastGettext about the theme's translations: look in the theme's
# locale-theme directory for a translation in the first place, and if
# it isn't found, look in the Alaveteli locale directory next:
diff --git a/lib/views/general/_before_head_end.html.erb b/lib/views/general/_before_head_end.html.erb
index 1644299..f8e729a 100644
--- a/lib/views/general/_before_head_end.html.erb
+++ b/lib/views/general/_before_head_end.html.erb
@@ -1 +1 @@
-<%= stylesheet_link_tag "/alavetelitheme/stylesheets/custom" %>
+<%= stylesheet_link_tag "custom" %>