ruby 代码
- create_table :users do |t|
- t.column :usd, :decimal, :precision => 8, :scale => 2, :default => 0
- end
- ruby script/performance/benchmarker "User.find(:all)"
- ruby script/performance/profiler "User.find(:all)"
ruby 代码
- ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!(
- :Ordinal => "%Y-%j"
- )
- any_date_field.to_s(:ordinal) #=> "2007-149"