1. 29 11月, 2013 1 次提交
  2. 15 11月, 2013 1 次提交
  3. 14 11月, 2013 1 次提交
  4. 12 11月, 2013 1 次提交
  5. 07 11月, 2013 1 次提交
    • C
      Add +capitalize+ option to Inflector.humanize · c61544c7
      claudiob 提交于
      So strings can be humanized without being capitalized:
      
          'employee_salary'.humanize                    # => "Employee salary"
          'employee_salary'.humanize(capitalize: false) # => "employee salary"
      c61544c7
  6. 31 10月, 2013 1 次提交
  7. 12 10月, 2013 1 次提交
  8. 11 10月, 2013 1 次提交
  9. 14 9月, 2013 4 次提交
  10. 13 9月, 2013 1 次提交
    • G
      Moved all JSON core extensions into core_ext/object/json · 64c88fb5
      Godfrey Chan 提交于
      TL;DR The primary driver is to remove autoload surprise.
      
      This is related to #12106. (The root cause for that ticket is that
      json/add defines Regexp#to_json among others, but here I'll reproduce
      the problem without json/add.)
      
      Before:
      
         >> require 'active_support/core_ext/to_json'
         => true
         >> //.as_json
         NoMethodError: undefined method `as_json' for //:Regexp
           from (irb):3
           from /Users/godfrey/.rvm/rubies/ruby-2.0.0-p195/bin/irb:16:in `<main>'
         >> //.to_json
         => "\"(?-mix:)\""
         >> //.as_json
         => "(?-mix:)"
      
      After:
      
         >> require 'active_support/core_ext/to_json'
         => true
         >> //.as_json
         => "(?-mix:)"
      
      This is because ActiveSupport::JSON is autoloaded the first time
      Object#to_json is called, which causes additional core extentions
      (previously defined in active_support/json/encoding.rb) to be loaded.
      
      When someone require 'active_support/core_ext', the expectation is
      that it would add certain methods to the core classes NOW. The
      previous behaviour causes additional methods to be loaded the first
      time you call `to_json`, which could cause nasty surprises and other
      unplesant side-effects.
      
      This change moves all core extensions in to core_ext/json. AS::JSON is
      still autoloaded on first #to_json call, but since it nolonger
      include the core extensions, it should address the aforementioned bug.
      
      *Requiring core_ext/object/to_json now causes a deprecation warnning*
      64c88fb5
  11. 07 9月, 2013 1 次提交
  12. 03 9月, 2013 1 次提交
  13. 18 8月, 2013 1 次提交
  14. 15 8月, 2013 2 次提交
  15. 28 7月, 2013 2 次提交
  16. 24 7月, 2013 4 次提交
  17. 14 6月, 2013 1 次提交
  18. 09 6月, 2013 1 次提交
  19. 28 5月, 2013 1 次提交
  20. 12 5月, 2013 1 次提交
  21. 01 5月, 2013 2 次提交
  22. 30 4月, 2013 1 次提交
  23. 14 4月, 2013 1 次提交
  24. 07 4月, 2013 1 次提交
  25. 25 3月, 2013 1 次提交
  26. 14 3月, 2013 1 次提交
  27. 23 2月, 2013 1 次提交
  28. 23 1月, 2013 1 次提交
  29. 06 1月, 2013 1 次提交
  30. 04 1月, 2013 2 次提交