1. 03 8月, 2012 10 次提交
  2. 02 8月, 2012 10 次提交
  3. 01 8月, 2012 12 次提交
  4. 31 7月, 2012 8 次提交
    • R
      Merge pull request #7212 from accessd/small-typo-fix · c1020220
      Rafael Mendonça França 提交于
      small fix typo in collection proxy
      c1020220
    • A
      fix typo in collection proxy · 7dae39a7
      Accessd 提交于
      7dae39a7
    • J
      Update activesupport/CHANGELOG.md · 0e3c6669
      José Valim 提交于
      0e3c6669
    • J
      Merge pull request #7197 from davidcelis/i18n_inflector · 13af5ace
      José Valim 提交于
      Make ActiveSupport::Inflector locale aware and multilingual
      13af5ace
    • R
      Merge pull request #7176 from bogdan/reverse_order · b09d6aae
      Rafael Mendonça França 提交于
      AR::Relation#order: make new order prepend old one.
      b09d6aae
    • B
      AR::Relation#order: make new order prepend old one · 92641efe
      Bogdan Gusiev 提交于
          User.order("name asc").order("created_at desc")
          # SELECT * FROM users ORDER BY created_at desc, name asc
      
      This also affects order defined in `default_scope` or any kind of associations.
      92641efe
    • D
      Make ActiveSupport::Inflector locale aware and multilingual · 7db0b073
      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>
      7db0b073
    • C
      Merge pull request #7205 from frodsan/fix_nodoc_live · 10cdeb86
      Carlos Antonio da Silva 提交于
      Fix nodoc in metal/live [ci skip]
      10cdeb86