Skip to content

Commit

Permalink
using default en for locales
Browse files Browse the repository at this point in the history
  • Loading branch information
kristianmandrup committed Mar 30, 2012
1 parent 1570268 commit 9003dd6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/generators/flasher/locales/locales_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand All @@ -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.