Sha256: b0ecc3a8fc810e3b67f0455ae63c6c4e72e26cdd10fcff631ea7d07c09228c9f
Contents?: true
Size: 504 Bytes
Versions: 6
Compression:
Stored size: 504 Bytes
Contents
require "active_generator/base" require "generators/locale/base" module Locale class TaskGenerator < 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_task_file assert_valid_language! template("task.yml", "config/locales/#{language}/tasks/#{file_name}.yml") end end end
Version data entries
6 entries across 6 versions & 1 rubygems