aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Introduce `Rails.gem_version`Prem Sichanugrist2014-03-0519-54/+167
| | | | | | | | | | | | | | | | | | | This method return `Gem::Version.new(Rails.version)`, suggesting a more reliable way to perform version comparison. Example: Rails.version #=> "4.1.2" Rails.gem_version #=> #<Gem::Version "4.1.2"> Rails.version > "4.1.10" #=> false Rails.gem_version > Gem::Version.new("4.1.10") #=> true Gem::Requirement.new("~> 4.1.2") =~ Rails.gem_version #=> true This was originally introduced as `.version` by @charliesome in #8501 but got reverted in #10002 since it was not backward compatible. Also, updating template for `rake update_versions`.
* Remove a reference to an issue [ci skip]Robin Dupret2014-03-051-1/+1
| | | | | This actually not an issue fixing ; the changelog is referring to the introducing pull request itself.
* get rid of intermediate arrays.Yves Senn2014-03-051-2/+3
| | | | origin: https://github.com/rails/rails/commit/f6aeb8b1a3687c8523e4a56309fe3736011b2935#commitcomment-5569649
* we only need to support `asc` and `ASC`. No need for mixed cases. #14263Yves Senn2014-03-052-34/+25
| | | | This is a result of the discussion at https://github.com/rails/rails/pull/14263/files#r10291489
* docs, flash message keys are normalized to strings. [ci skip]Yves Senn2014-03-051-0/+20
| | | | This is a follow up to a668beffd64106a1e1fedb71cc25eaaa11baf0c1
* quick pass over Active Record CHANGELOG. [ci skip].Yves Senn2014-03-051-13/+10
|
* Merge pull request #14263 from robin850/allow_passing_string_to_order_hashYves Senn2014-03-053-5/+52
|\ | | | | Follow up of #10732 - Allow string hash values on AR order method
| * Allow string hash values on AR order methodMarcelo Casiraghi2014-03-043-5/+52
| | | | | | | | | | | | | | | | | | This behavior has almost no performance impact: String not allowed 66.910000 0.030000 66.940000 ( 67.024976) String allowed 69.360000 0.030000 69.390000 ( 69.503096) Benchmarked with http://git.io/Y0YuRw.
* | Merge pull request #14261 from MSch/bound-parameters-for-existsAaron Patterson2014-03-042-3/+20
|\ \ | | | | | | Make exists? use bound values.
| * | Make exists? use bound values.Martin Schürrer2014-03-042-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we build a query with an inline value that is a numeric (e.g. because it's out of range for an int4) PostgreSQL doesn't use an index on the column, since it's now comparing numerics and not int4s. This leads to a _very_ slow query. When we use bound parameters instead of inline values PostgreSQL raises numeric_value_out_of_range since no automatic coercion happens.
* | | Revert "Merge pull request #14269 from arthurnn/expanded_key_array"Godfrey Chan2014-03-043-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 475c96589ca65282e1a61350271c2f83f0d4044f, reversing changes made to 705915ab5cf24430892107764b0050c07e1df583. We decided that this is not worth busting everyone's cache as this seems like a very unlikely problem. The problem only occurs when the user is 1) not using a namespace, or 2) using the same namesapce for different *kinds* of cache items. The recommended "fix" is to put those cache items into their own namspace: id = 1 Rails.cache.fetch(id, namespace: "user"){ User.find(id) } ids = [1] Rails.cache.fetch(ids, namespace: "users"){ User.find(ids) } See the discussion on #14269 for details.
* | | Merge pull request #14269 from arthurnn/expanded_key_arrayGuillermo Iguaran2014-03-043-4/+14
|\ \ \ | |_|/ |/| | Cache key should be different when is Array.
| * | Cache key should be different when is Array.Arthur Neves2014-03-033-4/+14
| |/ | | | | | | | | | | | | | | `cache.fetch(['foo'])` and `cache.fetch('foo')` should generate different cache keys as they are not equivalents. [related #8615] [related #8614]
* | Merge pull request #14243 from pch/digestor-variantsDavid Heinemeier Hansson2014-03-046-24/+105
|\ \ | | | | | | Variants in ActionView::Digestor
| * | Variants in ActionView::DigestorPiotr Chmolowski2014-03-046-24/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take variants into account when calculating template digests in ActionView::Digest. Digestor#digest now takes a hash as an argument to support variants and allow more flexibility in the future. Old-style arguments have been deprecated. Fixes #14242
* | | Always return an array from formats so there is no need to wrap it when callingCarlos Antonio da Silva2014-03-043-3/+3
| | |
* | | Fix for external generators extend Erb::GeneratorsAllen Fair2014-03-041-1/+1
|/ / | | | | | | | | | | | | | | | | HAML and probably other generators extend this class and invoke filename_with_extensions with the old signature (without format). This makes the second argument optional and defaults it to the #format method which could be overridden as well. Closes #14132.
* | Inline block to fix indent [ci skip]Carlos Antonio da Silva2014-03-041-3/+1
| |
* | Merge pull request #14273 from vipulnsward/fix-warning-13244Yves Senn2014-03-041-1/+1
|\ \ | | | | | | Fix enum test unused variable warning.
| * | Fix enum test unused variable warning.Vipul A M2014-03-041-1/+1
|/ / | | | | | | Related - https://github.com/rails/rails/commit/5c55aafd38f45ac019573f98438ffdbdc8c580f9
* | Merge pull request #13244 from kommen/pg_enum_type_mapYves Senn2014-03-044-0/+45
|\ \ | | | | | | Add Enum type to postgresql adapter's oids to prevent unknown OID warnings
| * | Add Enum type to postgresql adapter's oids to prevent unknown OID warnings.Dieter Komendera2014-03-044-0/+45
| |/
* | Use 1.9 style hash on docs [ci skip]Carlos Antonio da Silva2014-03-041-1/+1
| |
* | Simplify handling of defaults/options in button_tagCarlos Antonio da Silva2014-03-041-4/+1
| | | | | | | | | | | | | | | | | | There's no need to rely on Active Support's Hash#reverse_merge for simple cases with default values, since we can just merge from the default rather than reverse merge from the options. This also avoids the creation of one extra hash object by moving to a Hash#merge! call.
* | Added missing changlog entry for #14255Godfrey Chan2014-03-041-0/+7
| |
* | Merge pull request #14255 from prikha/masterGodfrey Chan2014-03-042-5/+19
|\ \ | |/ |/| Fixes #14254 ActionView button_tag helper default options values issue.
| * remove private method and rewrite into more precise notationSergey Prikhodko2014-03-041-12/+12
| |
| * rollback to private methodSergey Prikhodko2014-03-031-5/+9
| |
| * cleanup and move extracted method right into the helperSergey Prikhodko2014-03-031-9/+5
| |
| * fix content_or_options to be replaced by options and set to nilSergey Prikhodko2014-03-031-1/+6
| |
| * fix indentationsSergey Prikhodko2014-03-031-4/+3
| |
| * fix form buttonSergey Prikhodko2014-03-031-5/+2
| |
| * fix button tag without optionsSergey Prikhodko2014-03-031-2/+2
| |
| * fix accept nil optionsSergey Prikhodko2014-03-031-3/+5
| |
| * fixes default attributes for button_tagSergey Prikhodko2014-03-032-7/+18
| |
* | Merge pull request #14258 from shuhei/fix_deep_munge_logCarlos Antonio da Silva2014-03-031-3/+3
|\ \ | | | | | | Add spaces to the log message of ActionController:: LogSubscriber#deep_munge
| * | Add spaces to deep_munge log message.Shuhei Kagawa2014-03-031-3/+3
|/ /
* | Add a comment to ensure that a test won't be removed [ci skip]Robin Dupret2014-03-031-1/+1
| | | | | | | | | | | | The 'cow' => 'kine' inflection has gone with c300dca9 but it should not be removed from the tested irregularities since it ensures that inflections work with words that do not begin with the same letters.
* | Merge pull request #14239 from zzak/refactor_actionpack_dispatch_request_testsJeremy Kemper2014-03-022-370/+386
|\ \ | | | | | | Refactor actionpack ActionDispatch::Request tests
| * | Refactor tests from BaseRackTest into BaseRequestTestZachary Scott2014-03-012-370/+386
| | |
* | | Merge pull request #14248 from vipulnsward/fix-pg-ar-warningsYves Senn2014-03-022-2/+2
|\ \ \ | |/ / |/| | Fix PG warnings.
| * | Fix warnings due to:Vipul A M2014-03-032-2/+2
|/ / | | | | | | | | - unused variable in PG Adapter. - Ambiguous argument warning from range_test for use - to + Infinity range without brackets.
* | Merge pull request #14234 from arthurnn/fix_trans_on_replaceSantiago Pastorino2014-03-012-1/+13
|\ \ | | | | | | Remove unnecessary db call when replacing.
| * | Remove unnecessary db call when replacing.Arthur Neves2014-02-282-1/+13
| | | | | | | | | | | | | | | | | | | | | When replacing a has_many association with the same one, there is no need to do a round-trip to the db to create/and drop a new transaction. [fixes #14220]
* | | Merge pull request #14240 from sferik/flat_mapJosé Valim2014-03-012-5/+5
|\ \ \ | | | | | | | | Replace map.flatten(1) with flat_map
| * | | Replace map.flatten(1) with flat_mapErik Michaels-Ober2014-02-282-5/+5
|/ / /
* | | make sure we wait for the threads to shut down before asserting closureAaron Patterson2014-02-281-0/+1
| | |
* | | Merge pull request #14195 from robin850/issue-14079Guillermo Iguaran2014-02-283-2/+23
|\ \ \ | | | | | | | | Avoid namespacing routes inside engines
| * | | Avoid namespacing routes inside enginesRobin Dupret2014-02-263-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since #11544, invoking the controller generator, any generated route is namespaced according to the class_path method. Since a mountable plugin is namespaced, creating a controller inside would generate a namespaced route based on the engine's name. The controller generator now relies on regular_class_path which does not contain the class hierarchy but the given path. Fixes #14079.
* | | | use built-in exception handling in live controllersAaron Patterson2014-02-282-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | when an exception happens in an action before the response has been committed, then we should re-raise the exception in the main thread. This lets us reuse the existing exception handling.