⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pop_seps.rb

📁 A Hotel Management System based on Ruby on Rails.
💻 RB
字号:
ENV["RAILS_ENV"] = 'development'
require 'config/environment'
require 'date'
include Globalize

files = Dir.glob("D:/projects/temp/old-mlr/lib/globalize/locales/country-data/*.rb")
files.each do |fp|
  sections = fp.split '/'
  fn = sections.last
  code, ext = fn.split '.'
  code.upcase!

  country = Country.pick(code)

  if !country
    puts "ERROR: can't find #{code}"
    next
  end


  str = File.read(fp)
  eval str

  country.thousands_sep = @country_data[:mon_thousands_sep]
  country.decimal_sep = @country_data[:mon_decimal_point]

  country.save!

  puts "updated #{country.english_name}"
  
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -