Sha256: ade10bbbe21432a66fac2affdc1f7547d2cd401d4b70511878d3d0d71f83b872

Contents?: true

Size: 516 Bytes

Versions: 10

Compression:

Stored size: 516 Bytes

Contents

# frozen_string_literal: true

module ChinaRegions
  class RegionsGenerator < Rails::Generators::Base
    source_root File.expand_path('../../../app', __dir__)

    def copy_models_file
      copy_file 'models/province.rb', 'app/models/province.rb'
      copy_file 'models/city.rb',     'app/models/city.rb'
      copy_file 'models/district.rb', 'app/models/district.rb'
    end

    def copy_js_file
      copy_file 'assets/javascripts/region_select.js', 'app/assets/javascripts/region_select.js'
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
china_regions-1.0.8 lib/generators/china_regions/regions_generator.rb
china_regions-1.0.7 lib/generators/china_regions/regions_generator.rb
china_regions-1.0.5 lib/generators/china_regions/regions_generator.rb
china_regions-1.0.4 lib/generators/china_regions/regions_generator.rb
china_regions-1.0.3 lib/generators/china_regions/regions_generator.rb
china_regions-1.0.2 lib/generators/china_regions/regions_generator.rb
china_regions-1.0.1 lib/generators/china_regions/regions_generator.rb
china_regions-1.0.0 lib/generators/china_regions/regions_generator.rb
china_regions-0.4.5 lib/generators/china_regions/regions_generator.rb
china_regions-0.4.4 lib/generators/china_regions/regions_generator.rb