Sha256: d98ac755b4b4524517b270b3e115afce4ba8d154707c52975bd17dd0a2948013

Contents?: true

Size: 495 Bytes

Versions: 9

Compression:

Stored size: 495 Bytes

Contents

require 'yaml'
require 'yaml_waml'

namespace :i18n do
  namespace :selectable_attr do
    task :load_all_models => :environment do
      Dir.glob(File.join(RAILS_ROOT, 'app', 'models', '**', '*.rb')) do |file_name|
        require file_name
      end
    end
    
    desc "Export i18n resources for selectable_attr entries"
    task :export => :"i18n:selectable_attr:load_all_models" do
      obj = {I18n.locale => SelectableAttr::Enum.i18n_export}
      puts YAML.dump(obj)
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
akm-selectable_attr-0.3.7 tasks/selectable_attr_tasks.rake
selectable_attr-0.3.17 tasks/selectable_attr_tasks.rake
selectable_attr-0.3.16 tasks/selectable_attr_tasks.rake
selectable_attr-0.3.15 tasks/selectable_attr_tasks.rake
selectable_attr-0.3.14 tasks/selectable_attr_tasks.rake
selectable_attr-0.3.13 tasks/selectable_attr_tasks.rake
selectable_attr-0.3.12 tasks/selectable_attr_tasks.rake
selectable_attr-0.3.11 tasks/selectable_attr_tasks.rake
selectable_attr-0.3.7 tasks/selectable_attr_tasks.rake