- 05 3月, 2013 1 次提交
-
-
由 Aman Gupta 提交于
-
- 29 1月, 2013 1 次提交
-
-
由 Xavier Noria 提交于
-
- 23 1月, 2013 1 次提交
-
-
由 Antoine Lyset 提交于
-
- 21 1月, 2013 2 次提交
-
-
由 Andrew White 提交于
Use the standard library's `DateTime.parse` because it's marginally faster and supports partial date/time strings. Benchmark: user system total real old 3.980000 0.000000 3.980000 ( 3.987606) new 3.640000 0.010000 3.650000 ( 3.641342)
-
由 Andrew White 提交于
This commit standardises the return value of `to_time` to an instance of `Time` in the local system timezone, matching the Ruby core and standard library behavior. The default form for `String#to_time` has been changed from :utc to :local but research seems to suggest the latter is the more common form. Also fix an edge condition with `String#to_time` where the string has a timezone offset in it and the mode is :local. e.g: # Before: >> "2000-01-01 00:00:00 -0500".to_time(:local) => 2000-01-01 05:00:00 -0500 # After: >> "2000-01-01 00:00:00 -0500".to_time(:local) => 2000-01-01 00:00:00 -0500 Closes #2453
-
- 05 1月, 2013 1 次提交
-
-
由 Kelly Stannard 提交于
I did this because to_date gives a very unhelpful error message if you do not pass in a correct date. In the process I think this cleans up the code nicely and even better it tends to be slightly faster than the current implementation. Benchmark https://gist.github.com/4440875
-
- 20 12月, 2012 1 次提交
-
-
由 Yuichiro Suzuki 提交于
-
- 11 12月, 2012 2 次提交
-
-
由 Andrew White 提交于
The Time.time_with_datetime_fallback, Time.utc_time and Time.local_time methods were added to handle the limitations of Ruby's native Time implementation. Those limitations no longer apply so we are deprecating them in 4.0 and they will be removed in 4.1.
-
由 Andrew White 提交于
This commit adds a convenience method for converting a string to an ActiveSupport::TimeWithZone instance using the configured Time.zone or another passed as an argument.
-
- 29 11月, 2012 2 次提交
-
-
由 Steve Klabnik 提交于
This behavior mattered under Ruby 1.8, but that doesn't matter now that we don't support it. In addition, we don't want to proxy the #class method. A test was added to prevent against regressions.
-
由 Steve Klabnik 提交于
This documentation has been out of date.
-
- 30 10月, 2012 1 次提交
-
-
由 Alexey Gaziev 提交于
-
- 24 10月, 2012 1 次提交
-
-
由 Geoffrey Roguelon 提交于
-
- 24 9月, 2012 1 次提交
-
-
由 Adam Stankiewicz 提交于
-
- 13 9月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
-
- 09 9月, 2012 1 次提交
-
-
由 Kalys Osmonov 提交于
-
- 07 8月, 2012 1 次提交
-
-
由 Xavier Noria 提交于
-
- 01 8月, 2012 1 次提交
-
- 31 7月, 2012 1 次提交
-
-
由 David Celis 提交于
The Inflector is currently not very supportive of internationalized websites. If a user wants to singularize and/or pluralize words based on any locale other than English, they must define each case in locale files. Rather than create large locale files with mappings between singular and plural words, why not allow the Inflector to accept a locale? This patch makes ActiveSupport::Inflector locale aware and uses `:en`` unless otherwise specified. Users will still be provided a list of English (:en) inflections, but they may additionally define inflection rules for other locales. Each list is kept separately and permanently. There is no reason to limit users to one list of inflections: ActiveSupport::Inflector.inflections(:es) do |inflect| inflect.plural(/$/, 's') inflect.plural(/([^aeéiou])$/i, '\1es') inflect.plural(/([aeiou]s)$/i, '\1') inflect.plural(/z$/i, 'ces') inflect.plural(/á([sn])$/i, 'a\1es') inflect.plural(/é([sn])$/i, 'e\1es') inflect.plural(/í([sn])$/i, 'i\1es') inflect.plural(/ó([sn])$/i, 'o\1es') inflect.plural(/ú([sn])$/i, 'u\1es') inflect.singular(/s$/, '') inflect.singular(/es$/, '') inflect.irregular('el', 'los') end 'ley'.pluralize(:es) # => "leyes" 'ley'.pluralize(:en) # => "leys" 'avión'.pluralize(:es) # => "aviones" 'avión'.pluralize(:en) # => "avións" A multilingual Inflector should be of use to anybody that is tasked with internationalizing their Rails application. Signed-off-by: NDavid Celis <david@davidcelis.com>
-
- 16 6月, 2012 1 次提交
-
-
由 Marc-Andre Lafortune 提交于
-
- 29 5月, 2012 1 次提交
-
-
由 Sergey Nartimov 提交于
AS::Multibyte are no longer required by access and filters string core extensions.
-
- 27 5月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 24 5月, 2012 1 次提交
-
- 20 5月, 2012 1 次提交
-
-
由 Henrik Hodne 提交于
For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace with the first match, and voilà! Note that the regex matches a little bit too much, so you probably want to `git add -i .` and go through every single diff to check if it actually should be changed.
-
- 18 5月, 2012 1 次提交
-
-
由 Vasiliy Ermolovich 提交于
-
- 17 5月, 2012 3 次提交
-
-
由 Sergey Nartimov 提交于
- access & filters don't use multibyte ext - transliterate requires only AS::Multibyte but not multibyte ext
-
由 Vasiliy Ermolovich 提交于
- 16 5月, 2012 1 次提交
-
-
由 Vasiliy Ermolovich 提交于
-
- 14 5月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
-
- 12 5月, 2012 10 次提交
-
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-