1. 07 5月, 2014 1 次提交
    • X
      several enhancements to humanize [closes #12288] · daaa21bc
      Xavier Noria 提交于
      * Strips leading underscores.
      * Changes some unnecessary gsub!s to sub!s.
      * Replaces some anchors ^, $ with \A, \z.
      * Documents that human inflection rules are applied.
      * Documents that words are downcased except acronyms.
      * Adds an example with an acronym.
      * Rewords docs.
      daaa21bc
  2. 20 4月, 2014 1 次提交
  3. 12 4月, 2014 1 次提交
  4. 11 4月, 2014 2 次提交
  5. 01 3月, 2014 1 次提交
  6. 28 2月, 2014 2 次提交
  7. 14 2月, 2014 1 次提交
  8. 10 1月, 2014 1 次提交
    • T
      Adding Hash#compact and Hash#compact! methods · 51215937
      tinogomes 提交于
        * Adding Hash#compact and Hash#compact! methods
        * Using Ruby 1.9 syntax on documentation
        * Updating guides for `Hash#compact` and `Hash#compact!` methods
        * Updating CHANGELOG for ActiveSupport
        * Removing unecessary protected method and lambda for `Hash#compact` implementations
        * Performing `Hash#compact` implementation - https://gist.github.com/tinogomes/8332883
        * fixing order position
        * Fixing typo
      51215937
  9. 03 12月, 2013 4 次提交
  10. 02 12月, 2013 1 次提交
  11. 29 11月, 2013 1 次提交
  12. 15 11月, 2013 1 次提交
  13. 14 11月, 2013 1 次提交
  14. 12 11月, 2013 1 次提交
  15. 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
  16. 31 10月, 2013 1 次提交
  17. 12 10月, 2013 1 次提交
  18. 11 10月, 2013 1 次提交
  19. 14 9月, 2013 4 次提交
  20. 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
  21. 07 9月, 2013 1 次提交
  22. 03 9月, 2013 1 次提交
  23. 18 8月, 2013 1 次提交
  24. 15 8月, 2013 2 次提交
  25. 28 7月, 2013 2 次提交
  26. 24 7月, 2013 4 次提交
  27. 14 6月, 2013 1 次提交