Permalink
Browse files

Moved generator files (Rails 3 compatibility).

This suggests they should live in that directory to work
with Rails 3:
http://nicksda.apotomo.de/2010/09/getting-a-bloody-rails-3-generator-running-and-testing-it/

Also the class name of the locales generator needed to be changed.
Last but not least, the path to the locale files was adjusted.
  • Loading branch information...
1 parent 86401eb commit 6c56ce61f0e59920b759e58e5f0c63bf017a2d8a @oneiros oneiros committed Mar 22, 2011
View
0 ...anguage_select/import/import_generator.rb → ...lized_language_select/import_generator.rb
File renamed without changes.
View
8 ...guage_select/locales/locales_generator.rb → ...ized_language_select/locales_generator.rb
@@ -2,7 +2,7 @@
module LocalizedLanguageSelect
module Generators
- class LocaleGenerator < Rails::Generators::Base
+ class LocalesGenerator < Rails::Generators::Base
desc "Copy language locale files"
class_option :locales, :type => :array, :default => ['all'], :desc => 'locales to generate for'
@@ -26,11 +26,11 @@ def locales
end
def locale_dir
- File.expand_path("../../../../locale", File.dirname __FILE__)
+ File.expand_path(locale_ref, File.dirname __FILE__)
end
def locale_ref
- "../../../../locale"
+ "../../../locale"
end
def locale_name
@@ -46,4 +46,4 @@ def copy_locales
end
end
end
-end
+end

0 comments on commit 6c56ce6

Please sign in to comment.