aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | [ci skip] Fix dead linkyui-knk2015-03-161-1/+1
|/ / / | | | | | | | | | | | | | | | | | | getting_started.html#the-mvc-architecture is lost by this commit 2f06c94e38a116fdfa43d7b7117e6bf911a0bff5 (Mar 14 2012 !). So replace it with wikipedia link.
* | | Fix leaky chain on polymorphic associationeileencodes2015-03-156-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there was a polymorphic hm:t association with a scope AND second non-scoped hm:t association on a model the polymorphic scope would leak through into the call for the non-polymorhic hm:t association. This would only break if `hotel.drink_designers` was called before `hotel.recipes`. If `hotel.recipes` was called first there would be no problem with the SQL. Before (employable_type should not be here): ``` SELECT COUNT(*) FROM "drink_designers" INNER JOIN "chefs" ON "drink_designers"."id" = "chefs"."employable_id" INNER JOIN "departments" ON "chefs"."department_id" = "departments"."id" WHERE "departments"."hotel_id" = ? AND "chefs"."employable_type" = ? [["hotel_id", 1], ["employable_type", "DrinkDesigner"]] ``` After: ``` SELECT COUNT(*) FROM "recipes" INNER JOIN "chefs" ON "recipes"."chef_id" = "chefs"."id" INNER JOIN "departments" ON "chefs"."department_id" = "departments"."id" WHERE "departments"."hotel_id" = ? [["hotel_id", 1]] ``` From the SQL you can see that `employable_type` was leaking through when calling recipes. The solution is to dup the chain of the polymorphic association so it doesn't get cached. Additionally, this follows `scope_chain` which dup's the `source_reflection`'s `scope_chain`. This required another model/table/relationship because the leak only happens on a hm:t polymorphic that's called before another hm:t on the same model. I am specifically testing the SQL here instead of the number of records becasue the test could pass if there was 1 drink designer recipe for the drink designer chef even though the `employable_type` was leaking through. This needs to specifically check that `employable_type` is not in the SQL statement.
* | | Merge pull request #19339 from y-yagi/mailer_preview_commentAndrew White2015-03-152-7/+7
|\ \ \ | | | | | | | | add mailer suffix to comments for email previews
| * | | add mailer suffix to comments for email previewsyuuji.yaginuma2015-03-152-7/+7
| | | |
* | | | Merge pull request #19340 from keepcosmos/association-doc-fixClaudio B.2015-03-151-2/+2
|\ \ \ \ | |/ / / |/| | | [ci skip]Doc fix about association hierarchy
| * | | Doc fix about association hierarchykeepcosmos2015-03-151-2/+2
|/ / /
* | | Merge pull request #19336 from tchandy/cleaning_actionview_testsCarlos Antonio da Silva2015-03-146-77/+1
|\ \ \ | | | | | | | | Cleaning actionview tests
| * | | Cleaning JavaScriptHelperTestThiago Pradi2015-03-141-8/+1
| | | |
| * | | Cleaning unused views from actionpack tests inside actionviewThiago Pradi2015-03-141-1/+0
| | | |
| * | | Zlib isn't required for AssetTagHelperTest anymoreThiago Pradi2015-03-141-1/+0
| | | |
| * | | Cleaning unused methods from abstract_unitThiago Pradi2015-03-141-57/+0
| | | |
| * | | Deleting unused fixturesThiago Pradi2015-03-142-10/+0
| | | |
* | | | Merge pull request #19337 from mnaberez/fix-actionpack-changelog-typoArun Agrawal2015-03-141-1/+1
|\ \ \ \ | |/ / / |/| | | Fix typo in Action Pack changelog
| * | | Fix typo in Action Pack changelog. [ci skip]Mike Naberezny2015-03-141-1/+1
|/ / /
* | | Merge pull request #19335 from JahBrewski/masterArthur Nogueira Neves2015-03-141-1/+1
|\ \ \ | | | | | | | | [ci skip] Subject-verb agreement
| * | | [ci skip] Subject-verb agreementJoel Brewer2015-03-141-1/+1
|/ / /
* | | Fix before_commit when updating a record on the callbackArthur Neves2015-03-142-23/+44
| | |
* | | Merge pull request #19322 from ↵Rafael Mendonça França2015-03-131-1/+1
|\ \ \ | | | | | | | | | | | | | | | | AndrewHendrie/AndrewHendrie-guides-testing-partials-patch Asserting partials modification
| * | | Asserting partials modificationAndrew Hendrie2015-03-131-1/+1
| | | | | | | | | | | | Changed "create Articles view" to "new article view". The create action doesn't typically have a view assigned to it. The view that's being referred to is the 'new' Article view.
* | | | Merge pull request #19323 from naoty/rake_initializerRafael Mendonça França2015-03-133-0/+14
|\ \ \ \ | | | | | | | | | | Add `rake initializer`
| * | | | Add `rake initializer`Naoto Kaneko2015-03-143-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | This task prints out initializers for an application. It is useful to develop a rubygem which involves the initialization process.
* | | | | Added missing closing brace in sample code for safe HTML translationsChristian Ress2015-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | Closes #19321. [ci skip]
* | | | | Merge pull request #19291 from hired/return-truthy-value-from-headRafael Mendonça França2015-03-132-0/+13
|\ \ \ \ \ | | | | | | | | | | | | Return truthy value from head method
| * | | | | Return true from head methodJoel Hayhurst2015-03-122-0/+13
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | It was returning false in normal circumstances. This broke the `head :ok and return if` construct. Add appropriate test.
* | | | | Merge pull request #19311 from square/aj-adapter-lookupRafael Mendonça França2015-03-132-5/+9
|\ \ \ \ \ | | | | | | | | | | | | `QueueAdapters` now does lazy lookup
| * | | | | `QueueAdapters` does the lookupTamir Duberstein2015-03-122-5/+9
| | | | | |
* | | | | | Merge pull request #19315 from josh/update-sprockets-linksRafael Mendonça França2015-03-136-10/+10
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | Update sprockets links to point to rails org
| * | | | | Update sprockets links to point to rails orgJoshua Peek2015-03-136-10/+10
|/ / / / /
* | | | | Merge pull request #19317 from kuldeepaggarwal/doc-select-tag-outputAbdelkader Boudih2015-03-131-15/+15
|\ \ \ \ \ | | | | | | | | | | | | [ci skip] correct output of select
| * | | | | [ci skip] correct output of selectKuldeep Aggarwal2015-03-131-15/+15
|/ / / / /
* | | | | Merge pull request #19313 from akshay-vishnoi/options-docsRafael Mendonça França2015-03-121-5/+5
|\ \ \ \ \ | | | | | | | | | | | | [CI SKIP] Correct output of options_for_select
| * | | | | [CI SKIP] Correct output of options_for_selectAkshay Vishnoi2015-03-131-5/+5
|/ / / / /
* | | | | Merge pull request #19312 from mariusbutuc/fix-mailer-testing-typoRafael Mendonça França2015-03-121-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | Fix typo in the Testing Your Mailers docs
| * | | | Fix typo in the “Testing Your Mailers” docsMarius Butuc2015-03-121-1/+1
|/ / / / | | | | | | | | * [ci skip]
* | | | Merge pull request #19309 from f1sherman/dont-set-session-options-idGuillermo Iguaran2015-03-125-13/+5
|\ \ \ \ | | | | | | | | | | Use request.session.id instead of request.session_options[:id]
| * | | | Use request.session.id instead of request.session_options[:id]Brian John2015-03-125-13/+5
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of the upgrade to Rack 1.5, request.session_options[:id] is no longer populated. Reflect this change in the tests by using request.session.id instead. Related change in Rack: https://github.com/rack/rack/commit/83a270d6
* | | | Merge pull request #19310 from square/aj-const-getArthur Nogueira Neves2015-03-121-1/+1
|\ \ \ \ | | | | | | | | | | Use a more conservative `const_get` over `constantize`
| * | | | Use a more conservative `const_get` over `constantize`Tamir Duberstein2015-03-121-1/+1
| | | | |
* | | | | Merge pull request #19271 from eagletmt/304-content-typeArthur Nogueira Neves2015-03-122-0/+13
|\ \ \ \ \ | |/ / / / |/| | | | 304 response should not include Content-Type header
| * | | | Also skip Content-Encoding and Vary header if 304Kohei Suzuki2015-03-122-4/+6
| | | | |
| * | | | 304 response should not include Content-Type headerKohei Suzuki2015-03-102-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Rack::Lint raises an error saying "Content-Type header found in 304 response, not allowed".
* | | | | Merge pull request #19308 from yui-knk/fix/doc_noteAbdelkader Boudih2015-03-121-1/+4
|\ \ \ \ \ | | | | | | | | | | | | [ci skip] Take NOTE: as paragraph to make NOTE block
| * | | | | [ci skip] Take NOTE: as paragraph to make NOTE blockyui-knk2015-03-121-1/+4
|/ / / / /
* | | | | Merge pull request #19301 from Empact/default-scopesCarlos Antonio da Silva2015-03-126-19/+20
|\ \ \ \ \ | | | | | | | | | | | | Isolate access to .default_scopes in ActiveRecord::Scoping::Default
| * | | | | Isolate access to .default_scopes in ActiveRecord::Scoping::DefaultBen Woosley2015-03-126-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead use .scope_attributes? consistently in ActiveRecord to check whether there are attributes currently associated with the scope. Move the implementation of .scope_attributes? and .scope_attributes to ActiveRecord::Scoping because they don't particularly have to do specifically with Named scopes and their only dependency, in the case of .scope_attributes?, and only caller, in the case of .scope_attributes is contained in Scoping.
* | | | | | Use `def setup` instead of `setup do`eileencodes2015-03-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `setup do` creates unnecessary allocations of proc objects in callbacks. This prevents that from happening and results in faster code.
* | | | | | Merge pull request #19303 from y-yagi/travel_to_docAbdelkader Boudih2015-03-121-9/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | add `DateTime.now` to list of `TimeHelpers#travel_to` stubbing [ci skip]
| * | | | | | add `DateTime.now` to list of `TimeHelpers#travel_to` stubbing [ci skip]yuuji.yaginuma2015-03-121-9/+11
|/ / / / / /
* | | | | | Merge pull request #19299 from mattbrictson/pg-ruby-22Yves Senn2015-03-122-2/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | Require pg ~> 0.18 to ensure Ruby 2.2 compatibility
| * | | | | | Require pg~>0.18 to ensure Ruby 2.2 compatibilityMatt Brictson2015-03-112-2/+7
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Versions of the pg gem earlier than 0.18.0 cannot be used safely with Ruby 2.2. Specifically, pg 0.17 when used with Ruby 2.2 has a known bug that causes random bits to be added to the end of strings. Further explanation here: https://bitbucket.org/ged/ruby-pg/issue/210/crazy-bytes-being-added-to-record