aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ActionCable should not raise when a connection is already openDuncan Grazier2017-01-062-3/+6
| | | | | | | | | | | ActionCable was throwing a "Existing connection must be closed before opening" exception which was being picked up as a production issue in our error monitoring software. Since this happens pretty often on any device that allows the browser to sleep (mobile) this error was getting triggered often. This change removes the exception, but keeps logging the occurrence. We now return `false` to let the caller now that `open` failed.
* 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]
| * | | | | | Add instructions for available_locales [skip ci]Jari Jokinen2017-01-041-5/+10
| | |/ / / / | |/| | | |
* | | | | | Merge pull request #27399 from sinogermany/rails-env-for-empty-string-env-varsRafael Mendonça França2017-01-033-1/+18
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Rails env for empty string env vars
| * | | | | | Rails.env falls back to dev mode when env var is emptyDaniel Deng2017-01-043-1/+18
| | | | | | |
* | | | | | | Merge pull request #27564 from kamipo/fix_find_by_active_record_base_object-2Rafael França2017-01-032-3/+8
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix `find_by` and `where` consistency
| * | | | | | | Fix `find_by` and `where` consistencyRyuta Kamizono2017-01-042-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The alternative of #26213. Currently `find_by` and `where` with AR object return inconsistent result. This is caused by statement cache does not support AR object. Passing to finder method to fix the issue. Fixes #26210.
* | | | | | | | Fix configuration test now that Metal#env was removedRafael Mendonça França2017-01-031-1/+1
|/ / / / / / /
* | | | | | | Revert "Merge pull request #21233 from ↵Rafael Mendonça França2017-01-0325-207/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtsmfm/disable-referential-integrity-without-superuser-privileges" This reverts commit eeac6151a55cb7d5f799e1ae33aa64a839cbc3aa, reversing changes made to 5c40239d3104543e70508360d27584a3e4dc5baf. Reason: Broke the isolated tests. https://travis-ci.org/rails/rails/builds/188721346
* | | | | | | Revert "Merge pull request #27550 from ↵Rafael Mendonça França2017-01-039-29/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtsmfm/fix-generator-command-for-nested-rails-engine" This reverts commit 1e969bfb98b88799e2c759fce25a1d8cf00d7ce7, reversing changes made to a5041f267ded119c2d00b8786c2f2c1e3f93c8a1. Reason: It breaks the public API
* | | | | | | Merge pull request #27550 from ↵Rafael França2017-01-039-9/+29
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtsmfm/fix-generator-command-for-nested-rails-engine Fix generator command for nested (namespaced) rails engine
| * | | | | | | Fix generator command for nested (namespaced) rails engineFumiaki MATSUSHIMA2017-01-039-9/+29
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we create nested (namespaced) rails engine such like bukkits-admin, `bin/rails g scaffold User name:string age:integer` will create `bukkits-admin/app/controllers/bukkits/users_controller.rb` but it should create `bukkits-admin/app/controllers/bukkits/admin/users_controller.rb`. In #6643, we changed `namespaced_path` as root path because we supposed application_controller is always in root but nested rails engine's application_controller will not.