Module: DateTimeFormats
- Defined in:
- lib/date_time_formats.rb,
lib/date_time_formats/version.rb
Defined Under Namespace
Classes: DateTimeFormatsRailtie
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
Class Method Details
.formats ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/date_time_formats.rb', line 3 def self.formats rails, default = {}, {} default = YAML.load_file("#{File.dirname(__FILE__)}/date_time_formats.yml") rails = YAML.load_file("#{Rails.root}/config/date_time_formats.yml") if defined?(Rails) && File.exists?("#{Rails.root}/config/date_time_formats.yml") default.merge(rails) # Rails.root/config/date_time_formats.yml override defaults end |