aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Hide PG::Connection from API docs [ci skip]Francesco Rodríguez2018-10-231-1/+1
|
* Merge pull request #34293 from tzmfreedom/fix_prlink_upgrade_5_1Ryuta Kamizono2018-10-231-1/+1
|\ | | | | [ci skip] Fix PullRequest link on Rails 5.1 Release Notes
| * Fix PullRequest link to datetime_field changes on Rails 5.1 Release Notestzmfreedom2018-10-231-1/+1
|/
* Merge pull request #34292 from yahonda/mysql8013Ryuta Kamizono2018-10-231-1/+3
|\ | | | | MySQL 8.0.13 raises `ER_NO_REFERENCED_ROW` and `ER_ROW_IS_REFERENCED`
| * MySQL 8.0.13 raises `ER_NO_REFERENCED_ROW` and `ER_ROW_IS_REFERENCED`Yasuo Honda2018-10-231-1/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when user has no parent table access privileges Refer https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-13.html#mysqld-8-0-13-errors >> * Previously, the ER_NO_REFERENCED_ROW_2 and ER_ROW_IS_REFERENCED_2 error messages for foreign key operations were displayed and revealed information about parent tables, even when the user had no parent table access privileges. Error handling for this situation has been revised: * If the user does have table-level privileges for all parent tables, ER_NO_REFERENCED_ROW_2 and ER_ROW_IS_REFERENCED_2 are displayed, the same as before. * If the user does not have table-level privileges for all parent tables, more generic error messages are displayed instead (ER_NO_REFERENCED_ROW and ER_ROW_IS_REFERENCED). << This pull request addresses these 3 failures: ```ruby $ ARCONN=mysql2 bundle exec ruby -w -Itest test/cases/adapter_test.rb -n /foreign/ Using mysql2 Run options: -n /foreign/ --seed 14251 F Failure: ActiveRecord::AdapterForeignKeyTest#test_foreign_key_violations_are_translated_to_specific_exception_with_validate_false [test/cases/adapter_test.rb:348]: [ActiveRecord::InvalidForeignKey] exception expected, not Class: <ActiveRecord::StatementInvalid> Message: <"Mysql2::Error: Cannot add or update a child row: a foreign key constraint fails: INSERT INTO `fk_test_has_fk` (`fk_id`) VALUES (1231231231)"> ... snip ... rails test test/cases/adapter_test.rb:343 F Failure: ActiveRecord::AdapterForeignKeyTest#test_foreign_key_violations_on_delete_are_translated_to_specific_exception [test/cases/adapter_test.rb:368]: [ActiveRecord::InvalidForeignKey] exception expected, not Class: <ActiveRecord::StatementInvalid> Message: <"Mysql2::Error: Cannot delete or update a parent row: a foreign key constraint fails: DELETE FROM fk_test_has_pk WHERE pk_id = 1"> ... snip ... rails test test/cases/adapter_test.rb:365 F Failure: ActiveRecord::AdapterForeignKeyTest#test_foreign_key_violations_on_insert_are_translated_to_specific_exception [test/cases/adapter_test.rb:358]: [ActiveRecord::InvalidForeignKey] exception expected, not Class: <ActiveRecord::StatementInvalid> Message: <"Mysql2::Error: Cannot add or update a child row: a foreign key constraint fails: INSERT INTO fk_test_has_fk (fk_id) VALUES (0)"> ... snip ... rails test test/cases/adapter_test.rb:357 Finished in 0.087370s, 34.3366 runs/s, 34.3366 assertions/s. 3 runs, 3 assertions, 3 failures, 0 errors, 0 skips $ ```
* Merge pull request #34286 from rails/fix-csp-dynamic-sourcesAndrew White2018-10-233-6/+41
|\ | | | | Fix CSP dynamic sources
| * Use request object for context if there's no controllerAndrew White2018-10-223-3/+20
| | | | | | | | | | | | | | | | There is no controller instance when using a redirect route or a mounted rack application so pass the request object as the context when resolving dynamic CSP sources in this scenario. Fixes #34200.
| * Apply mapping to symbols returned from dynamic CSP sourcesAndrew White2018-10-223-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously if a dynamic source returned a symbol such as :self it would be converted to a string implicity, e.g: policy.default_src -> { :self } would generate the header: Content-Security-Policy: default-src self and now it generates: Content-Security-Policy: default-src 'self'
* | Merge pull request #34284 from ↵Rafael França2018-10-231-5/+1
|\ \ | | | | | | | | | | | | bogdanvlviv/remove-mention-about-javascript-from-generators-guide Remove mentions about `javascripts` option from the guide about generators [ci skip]
| * | Remove mentions about `javascripts` option from the guide about generators ↵bogdanvlviv2018-10-221-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | [ci skip] This option is unused since #33079. Follow up #34277
* | | Merge pull request #34290 from ↵Rafael França2018-10-231-0/+18
|\ \ \ | | | | | | | | | | | | | | | | aergonaut/docs/ActiveSupport--Notifications-subscribe Add docs to ActiveSupport::Notifications.subscribe
| * | | Add docs to ActiveSupport::Notifications.subscribeChris Fung2018-10-221-0/+18
| | | | | | | | | | | | | | | | [ci skip]
* | | | Merge pull request #34261 from ↵Ryuta Kamizono2018-10-231-57/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | matildasmeds/guides_remove_upgrade_section_from_asset_pipeline_guide Remove "Upgrading from Old Versions" from Asset Pipeline Guide [skip ci]
| * | | | Remove "Upgrading Old Versions" from Asset Pipeline Guide [skip ci]Matilda Smeds2018-10-191-57/+0
| | | | | | | | | | | | | | | | | | | | | | | | | * How to upgrade Rails 2.x/3.2 not relevant for this Guide * All configuration changes are already included in Upgrading Ruby on Rails Guide
* | | | | Merge pull request #34289 from jschulenklopper/patch-1George Claghorn2018-10-221-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Add missing dot in comment in .gitignore template
| * | | | | Add missing dot in comment in .gitignore templateJochem Schulenklopper2018-10-221-1/+1
| | |/ / / | |/| | | | | | | | | | | | | My submission for the tiniest commit and PR contest: add a missing dot in a comment line in the generator template for .gitignore. (I just noticed this missing; consistency is king :-)
* | | | | Merge pull request #34222 from bogdanvlviv/unify-changelog-entriesRafael França2018-10-221-24/+8
|\ \ \ \ \ | |/ / / / |/| | | | Unify changelog entries related to `database` option of Rails generators [ci skip]
| * | | | Unify changelog entries related to `database` option of Rails generators [ci ↵bogdanvlviv2018-10-161-24/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | skip] `migrations_paths` option was added to migration generator, with changelog entry, in #33760. Also `migrations_paths` option was added to model generator, with changelog entry, in #33994. Then `migrations_paths` was renamed to `database` and aliased as `db` in #34021, and was added new changelog entry. I think we should edit existed changelog entries instead adding new about changing the name of the option from `migrations_paths` to `database` since Rails 6.0 hasn't been released yet, and since It might confuse readers of the changelog file in case if they've read changelog enty about adding `migrations_paths` option but haven't read the entry about change the name of that option to `database`. @eileencodes, @gmcgibbon, @rafaelfranca Does it make sense?
* | | | | Merge pull request #34278 from ↵Gannon McGibbon2018-10-221-3/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | GeniusStorm/remove_dependent_destroy_from_belongs_to_doc Fix #33914 : Remove dependent: :destroy option from the belong_to example since there is a warning associated with the usage of dependent: :destroy along with belongs_to
| * | | | | [ci skip] Fix #33914Raghu Kamat2018-10-221-3/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | This commit removes the dependent: :destroy option from the belong_to example since there is a warning associated with the usage of dependent: :destroy along with belongs_to. Based on the feedback on the issue #33914, I replaced dependent: :destroy with touch: :books_updated_at which will make the example consistent with the example that already exists on that page. * Also Removing the touch option from the belong_to scopes example as the option doesnt have any relation to association scope.
* | | | | Merge pull request #34241 from gmcgibbon/clarify_i18n_load_paths_gotchaRafael França2018-10-221-1/+3
|\ \ \ \ \ | |_|_|_|/ |/| | | | Clarify i18n load paths gotcha
| * | | | [ci skip] Clarify load_paths behaviourGannon McGibbon2018-10-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify `I18n.load_paths` vs `Rails.application.config.i18n.load_paths` behaviour. [Gannon McGibbon + Alberto Almagro Sotelo]
| * | | | [ci skip] Remove explicit to_s for consistency with other exampleTrevor Wistaff2018-10-161-1/+1
| | | | |
* | | | | Merge pull request #34279 from ↵Ryuta Kamizono2018-10-221-1/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | bogdanvlviv/remove-extra-remove_file-skip_action_cable Remove extra call `remove_file` on `rails new` with `--skip_action_cable`
| * | | | | Remove extra call `remove_file` on `rails new` with `--skip_action_cable`bogdanvlviv2018-10-221-1/+0
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | There is no need to remove this file since the line below removes entire directory in which that file is placed.
* | | | | Merge pull request #34273 from albertoalmagro/improve-event-variable-namingEileen M. Uchitelle2018-10-221-4/+4
|\ \ \ \ \ | | | | | | | | | | | | Rename event variable
| * | | | | Rename event variableAlberto Almagro2018-10-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve variable naming by renaming from `e` to `event`. The arguments to rename this are: * The naming `e` is usually a convention used for exceptions. * No other method in this class uses the naming `e`. All other methods are using `event`.
* | | | | | Merge pull request #34274 from ↵Ryuta Kamizono2018-10-223-17/+3
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | bogdanvlviv/remove-yarn-files-from-gitignore-template Remove yarn's files from `.gitignore` template
| * | | | | Add `/yarn-error.log` to `.gitignore`bogdanvlviv2018-10-211-1/+2
| | | | | |
| * | | | | Remove yarn's files from `.gitignore` template for new rails appbogdanvlviv2018-10-212-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Webpacker already does it, see https://github.com/rails/webpacker/blob/895d2cfc15eda2edae9e667c642a02523d958f53/lib/install/template.rb#L25-L33 I also opened PR https://github.com/rails/webpacker/pull/1765 in order to make it add `/yarn-error.log` file too.
* | | | | | Merge pull request #34277 from ↵Ryuta Kamizono2018-10-222-4/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | bogdanvlviv/remove-javascripts-javascripts_engine-options-for-generators Remove `javascripts` and `javascript_engine` options for generators
| * | | | | | Remove `javascripts` and `javascript_engine` options for generatorsbogdanvlviv2018-10-222-4/+0
| |/ / / / / | | | | | | | | | | | | | | | | | | It is unused since #33079
* | | | | | Merge pull request #34276 from ↵Ryuta Kamizono2018-10-221-1/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | bogdanvlviv/remove-javascript-option-from-the-plugin-constant Remove `:javascript` from `Rails::PluginBuilder::PASSTHROUGH_OPTIONS`
| * | | | | Remove `:javascript` from `Rails::PluginBuilder::PASSTHROUGH_OPTIONS`bogdanvlviv2018-10-221-1/+1
|/ / / / / | | | | | | | | | | | | | | | `--javascript` option was removed by 42198064c35ff3b701496309f90df2abc229efbe
* | | | | Correct some tests related to changes in #33079 (#34272)Bogdan2018-10-222-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix assertions of auto-generated ActiveStorage JS Since #33079 * Correct message on the `assert_equal` failure Related to #33079 * Test ActionCable's js files This commit adds `app/javascript/channels/consumer.js`, and `app/javascript/channels/index.js` to `DEFAULT_APP_FILES` in order to assert their existance in `test_skeleton_is_created`. Related to #33079 * Assert no match `javascript_pack_tag` in `application.html.erb` Since #33079 `rails new` generates `application.html.erb` file with `javascript_pack_tag` instead of `javascript_include_tag`. Note that there some tests that asserting no matching `javascript_include_tag` in the `application.html.erb` file for newly generated rails plugins. It is related to #34009 and shouldn't be changed right now.
* | | | | Merge pull request #34270 from eugeneius/read_write_attribute_allocationsRyuta Kamizono2018-10-222-8/+6
|\ \ \ \ \ | |/ / / / |/| | | | Reduce string allocations in read/write_attribute
| * | | | Reduce string allocations in read/write_attributeEugene Kenny2018-10-212-8/+6
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `attr_name` is passed as a symbol, it's currently converted to a string by `attribute_alias?`, and potentially also `attribute_alias`, as well as by the `read_attribute`/`write_attribute` method itself. By converting `attr_name` to a string up front, the extra allocations related to attribute aliases can be avoided.
* | | | Merge pull request #34219 from wilddima/datetime-exception-messageRyuta Kamizono2018-10-212-3/+14
|\ \ \ \ | | | | | | | | | | Add message to exception in datetime type
| * | | | Add new exception message to datetime from hash castwilddima2018-10-212-3/+14
| | | | |
* | | | | Use String#truncate_bytes inside Multibyte::Chars#limitFrancesco Rodríguez2018-10-202-31/+1
| | | | |
* | | | | Merge pull request #34265 from olivierlacan/flexbox-guides-indexJeremy Daer2018-10-205-37/+73
|\ \ \ \ \ | | | | | | | | | | | | Improve layout of Rails Guides index
| * | | | | Replace outdated Rails Guides logoOlivier Lacan2018-10-193-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous version wasn’t matching the Rails Guides logo source file listed at https://github.com/rails/homepage/blob/master/materials/rails_guides_logo.psd somehow. It was also a GIF when an 8-bit PNG results in a smaller file (2KB vs 4KB) which should be just as widely compatible with browsers. And that’s just for the 1x version. I added a new 2x version for “retina” or high-density displays and a CSS @media query to progressively enhance with this high density version of the logo. I’ve ensured that this query is supported across browsers by using vendor-specific versions when necessary. See: https://caniuse.com/#feat=css-media-resolution [ci skip]
| * | | | | Shorten unnecessarily long names for GuidesOlivier Lacan2018-10-191-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The names are only used in the Guides Index overlay and several of them are longer than they need to be. For example “Ruby on Rails” is mentioned over and over again in the Release Notes section although these are obviously all Rails versions we’re listing. There’s a Maintenance Policy category with a Maintenance Policy article which is redundant. Policies makes much more sense as a category. Similarly, Contributing to Ruby on Rails is both a category and an article. “Contributions” is a better category title. “Ruby on Rails Guides Guidelines” is a gigantic mouthful. We are *in* the Rails Guides, we don’t need to specify what guides we’re talking about here. As a final added advantage, all of these shortenings make the index much easier to parse in order to find an article. [ci skip]
| * | | | | Use CSS flexbox for Guides index menuOlivier Lacan2018-10-192-20/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This notably allows us to tile each category without pushing the page down vertically as much as we previously did on any viewport wider than mobile sizes. It also means we can fit more guides which will become useful in the future since we have several new guides in the work. Finally the new layout allows three clearly distinct columns to emerge: - Start Here and Rails basics: Models, Views, Controllers, Other Components - Digging Deeper, Extending Rails, Contributing, Maintenance - Release Notes Having Release Notes shoot back up to the top of the third column is great because that makes finding the latest released version and its associated release notes much easier without having to scroll down a bunch. [ci skip]
* | | | | | Consistently use kwargs for `instance_{reader,writer,accessor}` optionsRyuta Kamizono2018-10-202-19/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since #29294, `mattr_acessor` uses kwargs for `instance_reader`, `instance_writer`, and `instance_accessor` options. `thread_mattr_accessor` and `config_accessor` also take the same options, so let's maintain these options handles the same.
* | | | | | Merge pull request #34260 from frodsan/fix/remove-unnecessary-escape-charRyuta Kamizono2018-10-202-4/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove unnecessary escape character
| * | | | | | Remove unnecessary escape characterFrancesco Rodríguez2018-10-192-4/+4
| | | | | | |
* | | | | | | Missing require "active_support/number_helper/number_converter"Akira Matsuda2018-10-207-0/+14
| | | | | | |
* | | | | | | Missing require "concurrent/hash"Akira Matsuda2018-10-201-0/+1
| | | | | | |
* | | | | | | Missing require "active_support/callbacks"Akira Matsuda2018-10-201-0/+2
| | | | | | |