Sha256: 881d4dff343874fbe6f37447bf8daad19a8dd7f83cdd66e69104a5377f1a4e9a
Contents?: true
Size: 749 Bytes
Versions: 2
Compression:
Stored size: 749 Bytes
Contents
module Admin::SettingsHelper require 'find' def fetch_langs options = content_tag(:option, "Select lang", :value => 'en_US') Find.find(RAILS_ROOT + "/lang") do |lang| if lang =~ /\.rb$/ lang_pattern = File.basename(lang).gsub(".rb", '') if this_blog.lang == lang_pattern options << content_tag(:option, lang_pattern, :value => lang_pattern, :selected => 'selected') else options << content_tag(:option, lang_pattern, :value => lang_pattern) end end end options end def sweep_cache_link cache = this_blog.cache_option == "caches_action_with_params" ? "sweep" : "sweep_html" link_to _("Sweep cache"), { :controller => "admin/cache", :action => cache } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
typo-5.1.98 | app/helpers/admin/settings_helper.rb |
typo-5.2 | app/helpers/admin/settings_helper.rb |