summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/helpers/admin_helper.rb10
1 files changed, 0 insertions, 10 deletions
diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb
index 1e84620..afed245 100644
--- a/app/helpers/admin_helper.rb
+++ b/app/helpers/admin_helper.rb
@@ -1,14 +1,4 @@
1module AdminHelper 1module AdminHelper
2
3 def language_selector
4 case I18n.locale
5 when :de
6 link_to raw('<span class="inactive">English</span>'), url_for(params.permit(:locale, :page_path).to_h.merge('locale' => 'en'))
7 when :en
8 link_to raw('<span class="inactive">English</span>'), url_for(params.permit(:locale, :page_path).to_h.merge('locale' => 'de'))
9 end
10 end
11
12 def mtime_busted_path(path) 2 def mtime_busted_path(path)
13 file = Rails.public_path.join(path.sub(%r{\A/}, "")) 3 file = Rails.public_path.join(path.sub(%r{\A/}, ""))
14 raise "Static asset not found for cache-busting: #{path} (looked for #{file})" unless File.exist?(file) 4 raise "Static asset not found for cache-busting: #{path} (looked for #{file})" unless File.exist?(file)