Sha256: 330beff3f8a4079503c77df14f75de337e44b2000b74596ce8806ec14daee5f7
Contents?: true
Size: 726 Bytes
Versions: 9
Compression:
Stored size: 726 Bytes
Contents
unless prefs[:locale] prefs[:locale] = ask_wizard('Set a locale? Enter nothing for English, or es, de, etc:') prefs[:locale] = 'none' unless prefs[:locale].present? end unless prefer :locale, 'none' add_gem 'devise-i18n' if prefer :authentication, 'devise' end stage_two do unless prefer :locale, 'none' gsub_file 'config/application.rb', /# config.i18n.default_locale.*$/, "config.i18n.default_locale = :#{prefs[:locale]}" locale_filename = "config/locales/#{prefs[:locale]}.yml" create_file locale_filename append_to_file locale_filename, "#{prefs[:locale]}:" end end __END__ name: locale description: "Set default locale" author: hedgesky category: other requires: [setup] run_after: [setup]
Version data entries
9 entries across 9 versions & 1 rubygems