aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* use the class level digest method for calculating the digestAaron Patterson2016-02-181-3/+1
|
* cache all subnodes in the digest cacheAaron Patterson2016-02-182-9/+11
| | | | | | | | | this is for backwards compatibility. We should remove this after 5-0-stable is created because digest calculation should be amortized. Caching digests of subtrees will speed up digests for other trees that share the same children. However, this will also increase memory, and after the app warms up, then those subtrees will never be reused which means that memory is wasted.
* Merge branch 'master' into treewipAaron Patterson2016-02-1844-92/+302
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (27 commits) move digest cache on to the DetailsKey object remove object `hash` cache [ci skip] fix suggested change-replace 'an' with 'the in Rails engine guide' Missing documentation about hash algorithm option for MessageVerifier [ci skip] set `skip_listen` option to dummy appplication Fix the language in engines guide Add accidentally removed `#` [ci skip] fields_for_style needs to test for AC::Parameters Fix indentation for code block in changelog Remove accidentally duplicated change log title [ci skip] partially revert 69009f4473637a44ade26d954ef5ddea6ff903f2 Remove needless `case_insensitive_comparison` in mysql2 adapter modify to `error` also abort when specify fail fast option Implement ActionController::Parameters#inspect remove unused method Remove unused Journey code Add Action Cable CHANGELOG in release notes [ci skip] Show proper error message when a non-relation object is passed to AR::Relation#or Fix semantics of test names for finish option in batches_test Fix typo ... Conflicts: actionview/lib/action_view/digestor.rb
| * Merge pull request #23756 from tenderlove/move_digest_cacheAaron Patterson2016-02-184-14/+28
| |\ | | | | | | move digest cache on to the DetailsKey object
| | * move digest cache on to the DetailsKey objectAaron Patterson2016-02-184-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves digest calculation cache on to the details key object. Before, the digest cache was a class level ivar, and one of the keys was the hash value of the details key object: https://github.com/rails/rails/blob/13c4cc3b5aea02716b7459c0da641438077f5236/actionview/lib/action_view/digestor.rb#L28 An object's hash value is not unique, so it's possible for this cache key to produce colliding keys with no resolution. This commit move cache on to the details key object itself, so we know that the digests are always unique per details key object.
| * | Merge pull request #23753 from y-yagi/skip_listen_in_dummy_appRafael França2016-02-182-0/+9
| |\ \ | | |/ | |/| set `skip_listen` option to dummy appplication
| | * set `skip_listen` option to dummy appplicationyuuji.yaginuma2016-02-182-0/+9
| | | | | | | | | | | | | | | | | | If you want to use `EventedFileUpdateChecker`, need to specify `listen` to plugin's gemspec. However, the default is not specified `listen` to plugin's gemspec, `EventedFileUpdateChecker` should be disabled.
| * | remove object `hash` cacheAaron Patterson2016-02-181-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't think caching this method makes any difference on Ruby 2.0: ``` require 'benchmark/ips' class Foo alias :object_hash :hash attr_reader :hash def initialize @hash = object_hash end end class Bar end hash = {} foo = Foo.new bar = Bar.new Benchmark.ips do |x| x.report("foo") { hash[foo] } x.report("bar") { hash[bar] } x.report("foo.hash") { foo.hash } x.report("bar.hash") { bar.hash } end __END__ [aaron@TC ruby (trunk)]$ ruby test.rb Warming up -------------------------------------- foo 118.361k i/100ms bar 118.637k i/100ms Calculating ------------------------------------- foo 7.944M (± 3.1%) i/s - 39.769M bar 7.931M (± 3.4%) i/s - 39.625M [aaron@TC ruby (trunk)]$ ruby test.rb Warming up -------------------------------------- foo 122.180k i/100ms bar 120.492k i/100ms foo.hash 123.397k i/100ms bar.hash 119.312k i/100ms Calculating ------------------------------------- foo 8.002M (± 4.2%) i/s - 39.953M bar 8.037M (± 4.5%) i/s - 40.124M foo.hash 8.819M (± 3.9%) i/s - 44.053M bar.hash 7.856M (± 4.1%) i/s - 39.254M ```
| * | Merge pull request #23750 from kamal-github/masterJon Moss2016-02-181-2/+2
| |\ \ | | | | | | | | fix the language for simple and proper understanding
| | * | [ci skip] fix suggested change-replace 'an' with 'the in Rails engine guide'kamal namdeo2016-02-181-1/+1
| | | |
| | * | Fix the language in engines guidekamal namdeo2016-02-181-1/+1
| | | |
| * | | Merge pull request #23744 from meinac/message_verifier_docsVipul A M2016-02-181-0/+6
| |\ \ \ | | |/ / | |/| | Missing documentation about hash algorithm option for MessageVerifier
| | * | Missing documentation about hash algorithm option for MessageVerifier [ci skip]Mehmet Emin İNAÇ2016-02-181-0/+6
| | | |
| * | | Merge pull request #23747 from kamipo/add_accidentally_removed_sharpSean Griffin2016-02-171-6/+6
| |\ \ \ | | | | | | | | | | Add accidentally removed `#` [ci skip]
| | * | | Add accidentally removed `#` [ci skip]Ryuta Kamizono2016-02-181-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | `#` was removed at f57092a but this `#` is intentional. e.g. https://github.com/rails/rails/blame/v5.0.0.beta2/activerecord/CHANGELOG.md#L1423-L1426
| * | | | Merge pull request #23736 from ↵Sean Griffin2016-02-172-7/+4
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | kamipo/remove_needless_case_insensitive_comparison_in_mysql2_adapter Remove needless `case_insensitive_comparison` in mysql2 adapter
| | * | | Remove needless `case_insensitive_comparison` in mysql2 adapterRyuta Kamizono2016-02-172-7/+4
| | | | | | | | | | | | | | | | | | | | Simply it is sufficient to override `can_perform_case_insensitive_comparison_for?`.
| * | | | fields_for_style needs to test for AC::ParametersAaron Patterson2016-02-172-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While iterating an AC::Parameters object, the object will mutate itself and stick AC::Parameters objects where there used to be hashes: https://github.com/rails/rails/blob/f57092ad728fa1de06c4f5fd9d09dcc2c4738fd9/actionpack/lib/action_controller/metal/strong_parameters.rb#L632 If you use `permit` after this iteration, the `fields_for_style` method wouldn't return true because the child objects are now AC::Parameters objects rather than Hashes. fixes #23701
| * | | | Fix indentation for code block in changelogEileen M. Uchitelle2016-02-171-4/+4
| | | | | | | | | | | | | | | This was showing up as an H1. Fixing the indentation here fixes the codeblock.
| * | | | Merge pull request #23746 from meinac/fix_ar_change_logEileen M. Uchitelle2016-02-171-3/+0
| |\ \ \ \ | | | | | | | | | | | | Remove accidentally duplicated change log title [ci skip]
| | * | | | Remove accidentally duplicated change log title [ci skip]Mehmet Emin İNAÇ2016-02-181-3/+0
| |/ / / /
| * | | | partially revert 69009f4473637a44ade26d954ef5ddea6ff903f2Aaron Patterson2016-02-171-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | we need to continue setting the body on the request object because of Fiber based streaming templates. Fixes #23659
| * | | | Merge pull request #22365 from ↵Sean Griffin2016-02-177-6/+111
| |\ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | phuibonhoa/phuibonhoa/polymorphic_where_multiple_types Fixed `where` for polymorphic associations when passed an array containing different types.
| | * | | Fixed `where` for polymorphic associations when passed an array containing ↵Philippe Huibonhoa2016-02-167-6/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | different types. When passing in an array of different types of objects to `where`, it would only take into account the class of the first object in the array. PriceEstimate.where(estimate_of: [Treasure.find(1), Car.find(2)]) # => SELECT "price_estimates".* FROM "price_estimates" WHERE ("price_estimates"."estimate_of_type" = 'Treasure' AND "price_estimates"."estimate_of_id" IN (1, 2)) This is fixed to properly look for any records matching both type and id: PriceEstimate.where(estimate_of: [Treasure.find(1), Car.find(2)]) # => SELECT "price_estimates".* FROM "price_estimates" WHERE (("price_estimates"."estimate_of_type" = 'Treasure' AND "price_estimates"."estimate_of_id" = 1) OR ("price_estimates"."estimate_of_type" = 'Car' AND "price_estimates"."estimate_of_id" = 2))
| * | | | Merge pull request #23570 from rthbound/addresses-23568Matthew Draper2016-02-182-8/+14
| |\ \ \ \ | | |_|_|/ | |/| | | Addresses #23568, Incorrect error message with accepts_nested_attributes_for / has_many & has_one
| | * | | Addresses #23568Ryan T. Hosford2016-02-092-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Corrects an incorrect exception message when using accepts_nested_attributes_for - Removes rescue/reraise behavior introduced in #19077 - Adds has_many & has_one, nested_attributes test case specifying the message that should be conveyed with an exception raised because one of the nested attributes provided is unknown
| * | | | Merge pull request #23730 from y-yagi/fail_fast_when_test_errorAndrew White2016-02-174-5/+20
| |\ \ \ \ | | | | | | | | | | | | modify to `error` also abort when specify fail fast option
| | * | | | modify to `error` also abort when specify fail fast optionyuuji.yaginuma2016-02-174-5/+20
| | | | | |
| * | | | | Merge pull request #23732 from bquorning/actioncontroller-parameters-inspectYves Senn2016-02-173-2/+15
| |\ \ \ \ \ | | | | | | | | | | | | | | Implement ActionController::Parameters#inspect
| | * | | | | Implement ActionController::Parameters#inspectBenjamin Quorning2016-02-173-2/+15
| | | |_|_|/ | | |/| | | | | | | | | | | | | | | Now that AC::Parameters is no longer a Hash, it shouldn't look like a hash.
| * | | | | Merge pull request #23662 from rthbound/adds-missing-digestor-nested-deps-testsYves Senn2016-02-172-0/+12
| |\ \ \ \ \ | | |/ / / / | |/| | | | adds missing tests for Digestor#nested_dependencies
| | * | | | adds tests for Digestor#nested_dependenciesRyan T. Hosford2016-02-132-0/+12
| | | | | |
| * | | | | Merge pull request #23731 from y-yagi/remove_unused_methodKasper Timm Hansen2016-02-171-4/+0
| |\ \ \ \ \ | | | | | | | | | | | | | | remove unused method
| | * | | | | remove unused methodyuuji.yaginuma2016-02-171-4/+0
| | | |/ / / | | |/| | | | | | | | | | | | | | | `app_templates_dir` is unused since dc53fe9.
| * | | | | Merge pull request #23729 from maclover7/rm-unused-journeyRafael França2016-02-172-8/+0
| |\ \ \ \ \ | | | | | | | | | | | | | | Remove unused Journey code
| | * | | | | Remove unused Journey codeJon Moss2016-02-172-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `VERSION` shouldn't be there anymore since Journey is technically part of Action Dispatch now (and thus Action Pack, and follows the normal Rails versioning scheme) - `backwards.rb` was only in the file tree because early in the history or Journey (back in 2011!), it was moved from under the Rack namespace, to its own namespace, Journey! This file is no longer required, and is assigning constants that are no longer needed.
| * | | | | | Merge pull request #23727 from prathamesh-sonpatki/fix-error-message-for-orRafael França2016-02-172-0/+10
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Show proper error message when a non-relation object is passed to AR::Relation#or
| | * | | | | | Show proper error message when a non-relation object is passed to ↵Prathamesh Sonpatki2016-02-172-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AR::Relation#or - Previously it used to show error message <"undefined method `limit_value' for {:title=>\"Rails\"}:Hash"> - Now it shows following error message. >> Post.where.not(name: 'DHH').or(name: 'Tenderlove') ArgumentError: You have passed Hash object to #or. Pass an ActiveRecord::Relation object instead. - Fixes #23714.
| * | | | | | | Merge pull request #23728 from ↵Rafael França2016-02-171-0/+1
| |\ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | prathamesh-sonpatki/add-ac-changelong-in-relase-notes Add Action Cable CHANGELOG in release notes [ci skip]
| | * | | | | | Add Action Cable CHANGELOG in release notes [ci skip]Prathamesh Sonpatki2016-02-171-0/+1
| |/ / / / / /
| * | | | | | Merge pull request #23726 from akshaymohite/fix-test-names-in-batches-testRafael França2016-02-171-2/+2
| |\ \ \ \ \ \ | | |_|/ / / / | |/| | | | | Fix semantics of test names for finish option in batches_test
| | * | | | | Fix semantics of test names for finish option in batches_testAkshay2016-02-171-2/+2
| |/ / / / / | | | | | | | | | | | | | | | | | | - The change was added in #23099
| * | | | | Fix typoRafael Mendonça França2016-02-171-1/+1
| | | | | |
| * | | | | Merge pull request #23712 from ↵Rafael França2016-02-172-10/+3
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | bf4/incorrect_to_accept_json_api_and_not_render_spec The JSON API media type should only work wih a JSON API handler
| | * | | | | The JSON API media type should only work wih a JSON API handlerBenjamin Fleischer2016-02-162-10/+3
| | | |_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the media type 'application/vnd.api+json' is a spec, it is inappropriate to handle it with the JSON renderer. This PR removes support for a JSON API media type. I would recommend the media type be registered on its own as `jsonapi` when a jsonapi Renderer and deserializer (Http::Parameters::DEFAULT_PARSERS) are added. Is related to work in https://github.com/rails/rails/pull/21496
| * | | | | Merge pull request #23713 from collectiveidea/add-store-attributes-testRafael França2016-02-171-0/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | Test parent local_stored_attributes isn't modified
| | * | | | | Test parent local_stored_attributes isn't modifiedDavid Genord II2016-02-161-0/+1
| | |/ / / / | | | | | | | | | | | | | | | | | | Saw the `merge!` and had to prove to myself that the parent model's local_stored_attributes was not being changed when stored_attributes is called on a child model. Proved to be working as expected but this test is probably still useful to keep around.
| * | / / / Fix code styleRafael Mendonça França2016-02-171-3/+4
| | |/ / / | |/| | | | | | | | | | | | | This change was added in #23203 and it was not conforming our code style.
| * | | | adds --skip-listen to the application generator [closes #23590]Xavier Noria2016-02-176-13/+42
| | | | |
* | | | | convert `digest` to only use kwargsAaron Patterson2016-02-171-4/+2
| | | | |