aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #27604 from ↵Kasper Timm Hansen2017-01-083-1/+18
|\ | | | | | | | | prathamesh-sonpatki/dont-generate-erb-views-for-api-scaffold-controller Don't generate HTML/ERB templates for scaffold controller with --api flag
| * Don't generate HTML/ERB templates for scaffold controller with --api flagPrathamesh Sonpatki2017-01-073-1/+18
| | | | | | | | - Fixes #27591.
* | Merge pull request #27603 from prathamesh-sonpatki/fix-random-failureSantiago Pastorino2017-01-081-0/+2
|\ \ | | | | | | Fix random failure related to migration environment
| * | Fix random failure related to migration environmentPrathamesh Sonpatki2017-01-071-0/+2
| |/ | | | | | | | | | | | | | | | | | | | | - Reference: https://travis-ci.org/rails/rails/jobs/189764676 - Reproduction command: MTB_VERBOSE=2 bundle exec minitest_bisect --seed 33328 -Itest "test/cases/migration_test.rb" "test/cases/tasks/database_tasks_test.rb" - You need to also add minitest_bisect gem to the Gemfile to reproduce this failure.
* | Merge pull request #27602 from prathamesh-sonpatki/followup-27596Santiago Pastorino2017-01-081-1/+8
|\ \ | | | | | | Followup of #27596, test output of "run" method as well
| * | Followup of #27596, test output of "run" method as wellPrathamesh Sonpatki2017-01-071-1/+8
| |/ | | | | | | | | | | - #27596 Updated "run" and "migrate" method for returning correct value but only added test for "migrate" method. This commit adds a test for "run" as well.
* | Merge pull request #27598 from ↵Sean Griffin2017-01-072-1/+18
|\ \ | |/ |/| | | | | NickLaMuro/fix-deep-nesting-where-clauses-with-joins Fix bug with symbolized keys in .where with nested join
| * Adds .to_s to table_name callNick LaMuro2017-01-061-1/+1
| | | | | | | | Avoids a NoMethodError when table_name is a symbol instead of a string.
| * Add failing test for where with joinsNick LaMuro2017-01-061-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This will cause a failure with the changes from 8e2e5f9: https://github.com/rails/rails/commit/8e2e5f9e3d1f434e265dc104ea9b00ff75702fc3 With the `singularize` call that is being done in that method when there is multiple nestings of associations (JOIN calling a JOIN) and the `stringify_keys!` is only called once here: https://github.com/rails/rails/blob/21e5fd4/activerecord/lib/active_record/relation/where_clause_factory.rb#L16 And not in the subsequent recursion in `.predicate_builder`
* | Merge pull request #27596 from schneems/schneems/migrator-resultRichard Schneeman2017-01-062-2/+18
|\ \ | |/ |/| Preserve `up` and `down` return type
| * Preserve `up` and `down` return typeschneems2017-01-062-2/+18
|/ | | | | | In Rails 4.2 calling `ActiveRecord::Migrator.migrate` would return an array of results. Without realizing that this return type was expected I accidentally introduced a change in https://github.com/rails/rails/commit/4d60e93174a3d6d90b1a06fc7515cb5cd749a6f3 This PR preserves the previous behavior and adds a test on the return type. This will need a backport to 5.0 branch.
* Merge pull request #27392 from y-yagi/use_same_class_on_compactSean Griffin2017-01-062-0/+14
|\ | | | | ensure `#compact` of HWIDA to return HWIDA
| * ensure `#compact` of HWIDA to return HWIDAyuuji.yaginuma2017-01-062-0/+14
| | | | | | | | | | | | | | | | `Hash#compact` of Ruby native returns new hash. Therefore, in order to return HWIDA as in the past version, need to define own `#compact` to HWIDA. Related: #26868
* | Merge pull request #27227 from MQuy/allow-custom-content-type-in-mail-bodyRafael Mendonça França2017-01-063-4/+38
|\ \ | | | | | | | | | Allow to custom content type when setting mailer body
| * | Remove unnecessary condition in content_typeMQuy2017-01-061-1/+1
| | |
| * | Add document in mailerMQuy2016-12-061-0/+13
| | |
| * | Fix wrong typo in testMQuy2016-12-051-1/+1
| | |
| * | Add changelog for custom content typeMQuy2016-12-012-0/+16
| | |
| * | allow context type when set body mailMQuy2016-11-302-4/+13
| | |
* | | Remove unneeded Deprecation silenceRafael Mendonça França2017-01-061-5/+3
| | |
* | | Merge pull request #27294 from eavgerinos/doc-ar-callbacks-orderRafael França2017-01-061-0/+49
|\ \ \ | | | | | | | | [documentation] ActiveRecord: Document order of Callbacks
| * | | [ci skip] ActiveRecord: Document order of CallbacksAggelos Avgerinos2016-12-221-0/+49
| | | |
* | | | Merge pull request #27586 from maclover7/jm-fix-27584Rafael França2017-01-062-3/+11
|\ \ \ \ | | | | | | | | | | Update `cookies` helper on all HTTP requests
| * | | | Update `cookies` helper on all HTTP requestsJon Moss2017-01-052-3/+11
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression introduced by ae29142142324545a328948e059e8b8118fd7a33 / 8363b879fe759f0645179f4521cc64795efbee6e. Previously, cookies were only updated on `GET` requests. Now we will update the helper for all requests, as part of `process`. Added regression tests for all available HTTP method helpers in `ActionController::TestCase`.
* | | | Privatize unneededly protected methods in Active RecordAkira Matsuda2017-01-055-16/+12
| | | |
* | | | `self.` is not needed when calling its own instance methodAkira Matsuda2017-01-0560-71/+71
| | | | | | | | | | | | | | | | Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
* | | | CI against jruby-9.1.6.0Akira Matsuda2017-01-051-3/+3
| | | | | | | | | | | | | | | | And let's see if it still fails...
* | | | This method is never called since 8e633e505880755e7e366ccec2210bbe2b5436e7Akira Matsuda2017-01-051-7/+0
| | | |
* | | | bundle u sqlite3Akira Matsuda2017-01-051-3/+3
| | | | | | | | | | | | | | | | this fixes sqlite3-1.3.12/lib/sqlite3/pragmas.rb:301: warning: method redefined; discarding old integrity_check
* | | | Merge pull request #27580 from kamipo/optimize_information_schema_queryRafael França2017-01-051-0/+1
|\ \ \ \ | | | | | | | | | | Optimizing information_schema query for `foreign_keys`
| * | | | Optimizing information_schema query for `foreign_keys`Ryuta Kamizono2017-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need `table_name` to avoid all databases scan. See https://dev.mysql.com/doc/refman/5.7/en/information-schema-optimization.html. ``` > EXPLAIN SELECT fk.referenced_table_name AS 'to_table', fk.referenced_column_name AS 'primary_key', fk.column_name AS 'column', fk.constraint_name AS 'name', rc.update_rule AS 'on_update', rc.delete_rule AS 'on_delete' FROM information_schema.key_column_usage fk JOIN information_schema.referential_constraints rc USING (constraint_schema, constraint_name) WHERE fk.referenced_column_name IS NOT NULL AND fk.table_schema = 'activerecord_unittest' AND fk.table_name = 'fk_test_has_pk' AND rc.table_name = 'fk_test_has_pk'\G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: fk partitions: NULL type: ALL possible_keys: NULL key: TABLE_SCHEMA,TABLE_NAME key_len: NULL ref: NULL rows: NULL filtered: NULL Extra: Using where; Open_full_table; Scanned 0 databases *************************** 2. row *************************** id: 1 select_type: SIMPLE table: rc partitions: NULL type: ALL possible_keys: NULL key: TABLE_NAME key_len: NULL ref: NULL rows: NULL filtered: NULL Extra: Using where; Open_full_table; Scanned 1 database; Using join buffer (Block Nested Loop) 2 rows in set, 1 warning (0.00 sec) ``` Fixes #27579.
* | | | | Fix style guide violationsRafael Mendonça França2017-01-055-9/+8
|/ / / /
* | | | Make sure we generate keys that can be used with the cipherRafael Mendonça França2017-01-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use aes-256-cbc cipher by default and it only accepts keys with 32 bytes at max. Closes #27576. [ci skip]
* | | | Merge pull request #26480 from tbrisker/fix-26461Rafael França2017-01-041-2/+7
|\ \ \ \ | | | | | | | | | | Clarify that mattr_* creates public methods
| * | | | Reword according to feedbackTomer Brisker2016-09-151-8/+7
| | | | |
| * | | | Clarify that mattr_* creates public methodsTomer Brisker2016-09-131-0/+6
| | | | |
* | | | | Merge pull request #27549 from mpugach/consider_params_in_current_pageRafael França2017-01-043-2/+20
|\ \ \ \ \ | | | | | | | | | | | | Add "check_parameters" option to "current_page?"
| * | | | | Add `check_parameters` option to `current_page?`Maksym Pugach2017-01-043-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: For "http://www.example.com/shop/checkout?order=desc&page=1" current_page?('http://www.example.com/shop/checkout') => true current_page?( 'http://www.example.com/shop/checkout', check_parameters: true ) => false
* | | | | | Merge pull request #27578 from kenta-s/fix-typo-in-asset_pipeline_mdJon Moss2017-01-041-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix typo in asset_pipeline.md [ci skip]
| * | | | | | Fix typo in asset_pipeline.md [ci skip]kenta-s2017-01-051-2/+2
|/ / / / / /
* | | | | | Merge pull request #27575 from yahonda/diag_like_26370Rafael França2017-01-042-2/+2
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | Require "models/post" before "models/comment"
| * | | | | Require "models/post" before "models/comment"Yasuo Honda2017-01-042-2/+2
|/ / / / / | | | | | | | | | | | | | | | Refer a similar pull request #26370
* | | | | Merge pull request #27446 from zachahn/asset-hash-md5-to-sha256Rafael França2017-01-041-22/+24
|\ \ \ \ \ | | | | | | | | | | | | Update asset fingerprinting information
| * | | | | Update asset fingerprinting informationZach Ahn2016-12-231-22/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced MD5 => SHA256 where necessary - Updated sprockets manifest example See: https://github.com/rails/sprockets/blob/dd9b3b53c06c602c49057bc4a426c1a446ed7a4a/lib/sprockets.rb#L26
* | | | | | String#end_with? should be faster than Regexp hereAkira Matsuda2017-01-051-1/+1
| | | | | |
* | | | | | There's no such moduleAkira Matsuda2017-01-052-8/+8
| | | | | |
* | | | | | No need to :doc: a public methodAkira Matsuda2017-01-051-1/+1
| | | | | |
* | | | | | Merge pull request #27485 from cih/hmt-warningAndrew White2017-01-045-0/+38
|\ \ \ \ \ \ | | | | | | | | | | | | | | Warn when has_many through is defined before through association
| * | | | | | Raise error when has_many through is defined before through associationChris Holmes2017-01-045-0/+38
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/rails/rails/issues/26834 This change raises an error if a has_many through association is defined before the through association.
* | | | | | Merge pull request #27552 from jarijokinen/fix-default-locale-code-exampleAndrew White2017-01-041-5/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix default locale code example [ci skip]