Permalink
Browse files

using default en for locales

  • Loading branch information...
1 parent 1570268 commit 9003dd67e13eeae1cf90396083d6166fe2438628 @kristianmandrup committed Mar 30, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/generators/flasher/locales/locales_generator.rb
@@ -3,7 +3,7 @@ module Generators
class LocalesGenerator < ::Rails::Generators::Name
attr_accessor :locale
- class_option :locales, :type => :array, :default => [], :desc => "Locales to generate"
+ class_option :locales, :type => :array, :default => ['en'], :desc => "Locales to generate"
def generate_locales
locales.each do |locale|
@@ -15,6 +15,12 @@ def generate_locales
def source_path
source_paths.first
end
+
+ protected
+
+ def locales
+ options[:locales] || ['en']
+ end
end
end
end

0 comments on commit 9003dd6

Please sign in to comment.