- 31 7月, 2012 8 次提交
-
-
由 José Valim 提交于
Make ActiveSupport::Inflector locale aware and multilingual
-
由 Rafael Mendonça França 提交于
AR::Relation#order: make new order prepend old one.
-
由 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.
-
由 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>
-
由 Carlos Antonio da Silva 提交于
Fix nodoc in metal/live [ci skip]
-
由 Francesco Rodriguez 提交于
-
由 Rafael Mendonça França 提交于
fix typo in metal/live [ci skip]
-
由 Francesco Rodriguez 提交于
-
- 30 7月, 2012 29 次提交
-
-
由 Rafael Mendonça França 提交于
update_column was suggested as replacement of update_attribute at the last release of 3-2-stable, so deprecating it now will confuse the users.
-
由 José Valim 提交于
class_attribute is a building block and using define_method can be much slower for such basic method definitions. This reverts commit d59208d7.
-
由 Rafael Mendonça França 提交于
Refactor ActionDispatch::Http::Cache::Response#cache_control_headers
-
由 Cainã Costa 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
responses. Processing controller actions in a separate thread allows us to work around the rack api - we can allow the user to set status and headers, then block until the first bytes are written. As soon as the first bytes are written, the main thread can return the status, headers, and (essentially) a queue for the body.
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Rafael Mendonça França 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
由 Aaron Patterson 提交于
Fix incorrect usage `require mysql` in the activerecord/.../mysql_rake_test
-
由 Carlos Antonio da Silva 提交于
Documentation Fix: Pointing the case when no dependent option is given to a association method
-
由 Carlos Antonio da Silva 提交于
More polite cleanup for sqlite tests
-
由 Carlos Antonio da Silva 提交于
DRY class_attribute
-
由 Vladimir Strakhov 提交于
-
由 Aleksandr Zykov 提交于
-
- 29 7月, 2012 3 次提交
-
-
由 Bogdan Gusiev 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-