- 03 8月, 2012 10 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
This is a private place to put those AS features that are used by every component. Nowadays we cherry-pick individual files wherever they are used, but that it is not worth the effort for stuff that is going to be loaded for sure sooner or later, like blank?, autoload, concern, etc.
-
由 José Valim 提交于
-
由 José Valim 提交于
Improve error handling when using partial name with hyphen. #7079
-
由 Rafael Mendonça França 提交于
Since b6ab4417 the single quotes are being escaped in the templates.
-
由 Rafael Mendonça França 提交于
zero and the new value is not a string. Before this commit this was the behavior r = Review.find_by_issue(0) r.issue => 0 r.changes => {} r.issue = 0 => 0 r.changed? => true r.changes => {"issue"=>[0,0]} Fixes #7237 Conflicts: activerecord/CHANGELOG.md
-
由 kennyj 提交于
-
- 02 8月, 2012 10 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
This can be used to get a Relation from an association. Previously we had a #scoped method, but we're deprecating that for AR::Base, so it doesn't make sense to have it here. This was requested by DHH, to facilitate code like this: Project.scope.order('created_at DESC').page(current_page).tagged_with(@tag).limit(5).scoping do @topics = @project.topics.scope @todolists = @project.todolists.scope @attachments = @project.attachments.scope @documents = @project.documents.scope end
-
由 Jon Leighton 提交于
This makes it easier to see what the documentation refers to. It also means that we are not doing unnecessary work for delegations that have no args / splats / block / etc.
-
由 Jon Leighton 提交于
This doesn't change the exernal behavior, but it moves some code around to where I think it properly belongs.
-
由 Jon Leighton 提交于
This method explicitly loads the records and then returns `self`. Rather than deciding between "do I want an array or a relation?", most people are actually asking themselves "do I want to eager load or lazy load?" Therefore, this method provides a way to explicitly eager-load without having to switch from a `Relation` to an array. Example: @posts = Post.where(published: true).load
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
This reverts commit 3803fcce. Conflicts: activerecord/CHANGELOG.md It will be deprecated only in 4.0, and removed properly in 4.1.
-
由 Carlos Antonio da Silva 提交于
has_secure_password should not raise a 'digest missing' error if the calling class has specified for validations to be skipped.
-
由 Carlos Antonio da Silva 提交于
Change AR's CHANGELOG, because it is related to e35c67ae [ci skip]
-
由 kennyj 提交于
-
- 01 8月, 2012 12 次提交
-
-
由 José Valim 提交于
The use_schema_cache_dump configuration moved to ActiveRecord.
-
由 kennyj 提交于
-
由 Carlos Antonio da Silva 提交于
Extract dependency check logic that raises ArgumentError in case of an invalid :dependent option given to an association. Closes #7054
-
由 Carlos Antonio da Silva 提交于
Move the logic for validation check to the same method, and cache dependent option in a variable to reuse inside the dependency configuration methods instead of relying on the options hash.
-
由 Hrvoje Šimić 提交于
-
由 Rafael Mendonça França 提交于
Restoring documentation for env_config
-
由 Justin Mazzi 提交于
-
由 Rafael Mendonça França 提交于
Updated scaffold_controller generator docs #7146
-
由 Aaron Cruz 提交于
It was just a copy of the controller generator documentation which was misleading. It doesn't accept arguments for views. This seems more descriptive as well. Respect 80 char limit. #7147 Made a nicer paragraph #7147
-
由 Rafael Mendonça França 提交于
Follow code conventions in metal/live
-
由 Robby Grossman 提交于
has_secure_password should not raise a 'digest missing' error if the calling class has specified for validations to be skipped.
-
- 31 7月, 2012 8 次提交
-
-
由 Rafael Mendonça França 提交于
small fix typo in collection proxy
-
由 Accessd 提交于
-
由 José Valim 提交于
-
由 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]
-