Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 9003dd67e1
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (21 sloc) 0.561 kb
module Flasher
module Generators
class LocalesGenerator < ::Rails::Generators::Name
attr_accessor :locale
class_option :locales, :type => :array, :default => ['en'], :desc => "Locales to generate"
def generate_locales
locales.each do |locale|
@locale = locale
template "locale.erb" , "app/config/flash/#{name}/#{locale}.yml"
end
end
def source_path
source_paths.first
end
protected
def locales
options[:locales] || ['en']
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.