aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #22447 from kamipo/fix_test_to_null_agnostic_wayRafael França2015-12-303-3/+14
|\ | | | | Fix `test_find_with_order_on_included_associations_with_construct_finder_sql_for_association_limiting_and_is_distinct` to NULL-agnostic way
| * Fix ↵Ryuta Kamizono2015-12-193-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `test_find_with_order_on_included_associations_with_construct_finder_sql_for_association_limiting_and_is_distinct` to NULL-agnostic way The sort order of NULL depends on the RDBS implementation. This commit is to fix the test to NULL-agnostic way. Example: ``` activerecord_unittest=# SELECT DISTINCT "posts"."id", author_addresses_authors.id AS alias_0 FROM "posts" LEFT OUTER JOIN "authors" ON "authors"."id" = "posts"."author_id" LEFT OUTER JOIN "author_addresses" ON "author_addresses"."id" = "authors"."author_address_id" LEFT OUTER JOIN "categorizations" ON "categorizations"."category_id" = "posts"."id" LEFT OUTER JOIN "authors" "authors_posts" ON "authors_posts"."id" = "categorizations"."author_id" LEFT OUTER JOIN "author_addresses" "author_addresses_authors" ON "author_addresses_authors"."id" = "authors_posts"."author_address_id" ORDER BY author_addresses_authors.id DESC; id | alias_0 ----+--------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 1 | 1 (12 rows) ``` ``` root@localhost [activerecord_unittest] > SELECT DISTINCT `posts`.`id`, author_addresses_authors.id AS alias_0 FROM `posts` LEFT OUTER JOIN `authors` ON `authors`.`id` = `posts`.`author_id` LEFT OUTER JOIN `author_addresses` ON `author_addresses`.`id` = `authors`.`author_address_id` LEFT OUTER JOIN `categorizations` ON `categorizations`.`category_id` = `posts`.`id` LEFT OUTER JOIN `authors` `authors_posts` ON `authors_posts`.`id` = `categorizations`.`author_id` LEFT OUTER JOIN `author_addresses` `author_addresses_authors` ON `author_addresses_authors`.`id` = `authors_posts`.`author_address_id` ORDER BY author_addresses_authors.id DESC; +----+---------+ | id | alias_0 | +----+---------+ | 1 | 1 | | 3 | NULL | | 1 | NULL | | 2 | NULL | | 4 | NULL | | 5 | NULL | | 6 | NULL | | 7 | NULL | | 8 | NULL | | 9 | NULL | | 10 | NULL | | 11 | NULL | +----+---------+ 12 rows in set (0.00 sec) ```
* | Merge pull request #22829 from jcoyne/test_parametersYves Senn2015-12-303-1/+10
|\ \ | | | | | | TestController#parameters returns AC::Parameters
| * | TestController#parameters returns AC::ParametersJustin Coyne2015-12-293-1/+10
| | | | | | | | | | | | | | | | | | | | | Fixes #22827 ActionView::TestCase::TestController#parameters should return an instance of ActionController::Parameters rather than a hash. This enables helper methods to use the correct interface.
* | | Merge pull request #22844 from prathamesh-sonpatki/issue_22836Yves Senn2015-12-301-2/+2
|\ \ \ | | | | | | | | Fix documentation for configuring default_charset [ci skip]
| * | | Fix documentation for configuring default_charset [ci skip]Prathamesh Sonpatki2015-12-301-2/+2
| | | | | | | | | | | | | | | | - Fixes #22836.
* | | | Merge pull request #22842 from akshay-vishnoi/typo-fixYves Senn2015-12-301-1/+1
|\ \ \ \ | | | | | | | | | | Fix typo
| * | | | Fix typoAkshay Vishnoi2015-12-301-1/+1
| | | | |
* | | | | Merge pull request #22843 from akshay-vishnoi/fix-release-5Yves Senn2015-12-301-3/+3
|\ \ \ \ \ | | | | | | | | | | | | [ci skip] Put all removals in its section
| * | | | | [ci skip] Put all removals in its sectionAkshay Vishnoi2015-12-301-3/+3
| |/ / / /
* | | | | Merge pull request #22845 from yui-knk/remove_not_used_fixtureYves Senn2015-12-301-1/+0
|\ \ \ \ \ | |/ / / / |/| | | | Remove not used test fixture
| * | | | Remove not used test fixtureyui-knk2015-12-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'actionmailer/test/mailers/async_mailer.rb' was deleted by f9da785d0b1b22317cfca25c15fb555e9016accb . This template is not used now.
* | | | | Merge pull request #22803 from kamipo/improve_select_one_in_mysql2_adapterRafael França2015-12-302-27/+15
|\ \ \ \ \ | | | | | | | | | | | | Improve `select_one` in `Mysql2Adapter`
| * | | | | Remove outdated commentRyuta Kamizono2015-12-271-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | These `select_*` methods improved already.
| * | | | | Improve `select_one` in `Mysql2Adapter`Ryuta Kamizono2015-12-272-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid instanciate `ActiveRecord::Result` and calling `ActiveRecord::Result#hash_rows` for the performance.
* | | | | | Merge pull request #22547 from kamipo/fix_create_table_info_cacheRafael França2015-12-291-2/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | Correctly cache create_table_info
| * | | | | | Correctly cache create_table_infoRyuta Kamizono2015-12-171-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up to #21664.
* | | | | | | Merge pull request #22830 from jcoyne/parameters_includeRichard Schneeman2015-12-293-1/+11
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Add AC::Parameters#include?
| * | | | | | | Add AC::Parameters#include?Justin Coyne2015-12-293-1/+11
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | Fixes #22818
* | | | | | | Merge pull request #22831 from ↵Santiago Pastorino2015-12-292-3/+24
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | jmbejar/mime-negotiation-format-from-extension-fix Mime negotiation format from extension improvements
| * | | | | | Format from Accept headers have higher precedence than path extension formatJorge Bejar2015-12-292-2/+11
| | | | | | |
| * | | | | | Rely on default Mime format when MimeNegotiation#format_from_path_extension ↵Jorge Bejar2015-12-292-3/+15
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is not a valid type Closes #22747
* | | | | | Merge pull request #22622 from akshay-vishnoi/range_format_fixKasper Timm Hansen2015-12-293-1/+31
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix - `to_s(:db)` in numeric range
| * | | | | | Fix - to_s(:db) on Numeric rangeAkshay Vishnoi2015-12-293-1/+31
|/ / / / / /
* | | | | | Merge pull request #22824 from maclover7/add-numericwithformat-testsYves Senn2015-12-291-0/+6
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | Add test coverage for ActiveSupport::NumericWithFormat#to_formatted_s
| * | | | | Add test coverage for ActiveSupport::NumericWithFormat#to_formatted_sJon Moss2015-12-281-0/+6
| | | | | |
* | | | | | Merge pull request #22822 from maclover7/fix-22805Richard Schneeman2015-12-281-0/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add a missing require to ActiveSupport::NumericWithFormat
| * | | | | | Add a missing require to ActiveSupport::NumericWithFormatJon Moss2015-12-281-0/+1
| |/ / / / /
* | | | | | Merge pull request #22053 from Empact/first-loadedYves Senn2015-12-284-16/+76
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Fix #first(limit) to take advantage of #loaded? records if available
| * | | | | | Fix `first(limit)` to take advantage of `loaded?` records if availableBen Woosley2015-12-243-8/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I realized that `first(2)`, etc. was unnecessarily querying for the records when they were already preloaded. This was because `find_nth_with_limit` can not know which `@records` to return because it conflates the `offset` and `index` into a single variable, while the `@records` only needs the `index` itself to select the proper record. Because `find_nth` and `find_nth_with_limit` are public methods, I instead introduced a private method `find_nth_with_limit_and_offset` which is called internally and handles the `loaded?` checking. Once the `offset` argument is removed from `find_nth`, `find_nth_with_limit_and_offset` can be collapsed into `find_nth_with_limit`, with `offset` always equal to `offset_index`.
| * | | | | | Deprecate passing `offset` to `find_nth`Ben Woosley2015-12-242-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All uses of the `offset` are passing `offset_index`. Better to push down the `offset` consideration into `find_nth`. This also works toward enabling `find_nth_with_limit` to take advantage of the `loaded?` state of the relation.
* | | | | | | tests, don't connect to mysql when running sqlite3 tests.Yves Senn2015-12-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This resolves the following error: ``` Error: TestAdapterWithInvalidConnection#test_inspect_on_Model_class_does_not_raise: TypeError: superclass mismatch for class Mysql2Adapter /Users/senny/Projects/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:35:in `<module:ConnectionAdapters>' /Users/senny/Projects/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:34:in `<module:ActiveRecord>' /Users/senny/Projects/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:6:in `<top (required)>' /Users/senny/Projects/rails/activesupport/lib/active_support/dependencies.rb:302:in `require' /Users/senny/Projects/rails/activesupport/lib/active_support/dependencies.rb:302:in `block in require' /Users/senny/Projects/rails/activesupport/lib/active_support/dependencies.rb:268:in `load_dependency' /Users/senny/Projects/rails/activesupport/lib/active_support/dependencies.rb:302:in `require' /Users/senny/Projects/rails/activerecord/lib/active_record/connection_adapters/connection_specification.rb:174:in `spec' /Users/senny/Projects/rails/activerecord/lib/active_record/connection_handling.rb:50:in `establish_connection' /Users/senny/Projects/rails/activerecord/test/cases/invalid_connection_test.rb:12:in `setup' ```
* | | | | | | Merge pull request #22809 from prathamesh-sonpatki/fix-broadcast-typoMatthew Draper2015-12-281-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Removed extra "the" in the documentation of `broadcast_message` [ci skip]
| * | | | | | | Removed extra "the" in the documentation of `broadcast_message` [ci skip]Prathamesh Sonpatki2015-12-281-1/+1
|/ / / / / / /
* | | | | | | [ci skip] Fix typos in Active Support changelog.Kasper Timm Hansen2015-12-271-2/+2
| | | | | | | | | | | | | | | | | | | | | It's numeric and the framework is called Action Controller.
* | | | | | | Merge pull request #22771 from nwjsmith/document-broadcast-messagesEileen M. Uchitelle2015-12-271-1/+9
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Document `Logger#broadcast_messages` option
| * | | | | | | Document `Logger#broadcast_messages` optionNate Smith2015-12-231-1/+9
| | | | | | | |
* | | | | | | | Add CHANGELOG entry for #22759eileencodes2015-12-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CHANGELOG entry for petabyte and exabyte
* | | | | | | | Merge pull request #22759 from akshay-vishnoi/human-size-helperEileen M. Uchitelle2015-12-278-9/+43
|\ \ \ \ \ \ \ \ | |_|_|_|_|/ / / |/| | | | | | | Add support for Petabyte and Exabyte in number to human size
| * | | | | | | Add support for Petabyte and Exabyte in number to human sizeAkshay Vishnoi2015-12-228-9/+43
| | | | | | | |
* | | | | | | | Merge pull request #22801 from y-yagi/fix_link_to_prRichard Schneeman2015-12-271-1/+1
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | | fix link to pr [ci skip]
| * | | | | | | fix link to pr [ci skip]yuuji.yaginuma2015-12-271-1/+1
|/ / / / / / /
* | | | | | | Merge pull request #22791 from habermann24/action_cable_stylingRafael França2015-12-252-9/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | [ActionCable] remove not needed protected call and newlines
| * | | | | | | [ActionCable] remove not needed protected call and newlinesJan Habermann2015-12-252-9/+1
| | | | | | | |
* | | | | | | | Merge pull request #22792 from maclover7/patch-3Rafael França2015-12-251-0/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Add Ruby 2.3.0 to Travis matrix
| * | | | | | | Add Ruby 2.3.0 to Travis matrixJon Moss2015-12-251-0/+1
|/ / / / / / /
* | | | | | | Merge pull request #22789 from prathamesh-sonpatki/fix-thor-default-type-errorYves Senn2015-12-251-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Changed default value of `:rc` option to `nil`
| * | | | | | | Changed default value of `:rc` option to `nil`Prathamesh Sonpatki2015-12-251-1/+1
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This fixes an error thrown by Thor because type of default value of `:rc` option which is `:boolean` does not match with it's default type which is `string`. - Ref - https://github.com/erikhuda/thor/blob/master/lib/thor/parser/option.rb#L125
* | | | | | | Merge pull request #22787 from kamipo/fix_varbinary_with_default_empty_stringSean Griffin2015-12-242-13/+10
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix varbinary with default ''
| * | | | | | | Fix varbinary with default ''Ryuta Kamizono2015-12-242-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A `(?:var)?binary` with default '' is a correct definition. Remove `missing_default_forged_as_empty_string?` method for fixing this issue because this method is a workaround for older mysql legacy adapter (19c99ac, f7015336).