lib/generators/translatable/translation_generator.rb in translatable-0.3.0 vs lib/generators/translatable/translation_generator.rb in translatable-0.3.1
- old
+ new
@@ -3,11 +3,11 @@
module Translatable
module Generators
class TranslationGenerator < Rails::Generators::NamedBase
include Translatable::GeneratorHelper
- desc "Creates ActiveRecord for translation dealer"
+ desc "Creates ActiveRecord for translation"
class_option :prefix, :type => :string, :default => "translatable", :desc => "Specifies the prefix to used tof translation dealer (Default: translatable)"
class_option :origin, :type => :string, :default => "origin", :desc => "Specifies the association name to be use for origin (Default: origin)"
class_option :locale, :type => :string, :default => "locale", :desc => "Specifies the column to be use for locale (Default: locale)"
@@ -28,12 +28,12 @@
block = <<CONTENT
# This class deals purely with translations themselves. Hence, any edition of
# should be avoided.
# In later gem version its existance might not be necessary.
CONTENT
- unless attributes.empty?
- block << " attr_accessible :#{attributes.map(&:name).join(", :")}\n"
- end
+ # unless attributes.empty?
+ # block << " attr_accessible :#{attributes.map(&:name).join(", :")}\n"
+ # end
block << " #attr_protected :#{options[:origin]}_id, :#{options[:locale]}\n"
block
end
def file_name
\ No newline at end of file