Sha256: 9363a9922ae12285d378ff8b905fd9cd4d71e0aac91f1dade8707b3c91718d31

Contents?: true

Size: 589 Bytes

Versions: 6

Compression:

Stored size: 589 Bytes

Contents

require "active_generator/base"
require "generators/locale/base"

module Locale
  class RespondersControllerGenerator < Rails::Generators::NamedBase
    include ActiveGenerator::Base
    include Locale::Base

    source_root File.expand_path('../templates', __FILE__)
    argument :language, type: :string, required: false, default: "en", desc: "The locale alpha code"

    def copy_responders_controller_file
      assert_valid_language!
      template("responders_controller.yml", "config/locales/#{language}/responders_controllers/#{namespace_path}/#{file_name}.yml")
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
active_generator-2.0.10 lib/generators/locale/responders_controller/responders_controller_generator.rb
active_generator-2.0.9 lib/generators/locale/responders_controller/responders_controller_generator.rb
active_generator-2.0.8 lib/generators/locale/responders_controller/responders_controller_generator.rb
active_generator-2.0.7 lib/generators/locale/responders_controller/responders_controller_generator.rb
active_generator-2.0.6 lib/generators/locale/responders_controller/responders_controller_generator.rb
active_generator-2.0.5 lib/generators/locale/responders_controller/responders_controller_generator.rb