aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #32572 from nao0515ki/add_optional_true_to_self_joins_sectionRafael França2018-04-201-1/+1
|\ | | | | [ci skip] belongs_to in self join association needs optional: true, if it's over 5.0 ver of rails
| * [ci skip] belongs_to in self join association needs optional: true, if it's ↵nao0515ki2018-04-141-1/+1
| | | | | | | | over 5.0 ver of rails
* | Don't include bootsnap by default in apps generated under JRubyGuillermo Iguaran2018-04-202-4/+13
| |
* | Merge pull request #32403 from albertoalmagro/improve-source-annotation-commentsRafael França2018-04-201-6/+6
|\ \ | | | | | | [ci skip] Improve Rails::SourceAnnotationExtractor documentation
| * | [ci skip] Prefix class name with Rails:: in docsAlberto Almagro2018-04-201-3/+3
| | | | | | | | | | | | | | | After renaming and deprecation of SourceAnnotationExtractor documentation has been updated to reflect the new name Rails::SourceAnnotationExtractor
| * | [ci skip] Improve #find_in documentation.Alberto Almagro2018-04-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The previous documentation version listed only the default registered extensions. This was misleading because if more extensions get registered with <tt>SourceAnnotationExtractor::Annotation.register_extensions</tt>, they would be also taken into account. By saying that we consider all registered extensions we document what happens in reality.
* | | Merge pull request #32667 from yahonda/mod_empty_insert_statement_valueRafael França2018-04-203-3/+3
|\ \ \ | |/ / |/| | Allow `primary_key` argument to `empty_insert_statement_value`
| * | Allow `primary_key` argument to `empty_insert_statement_value`Yasuo Honda2018-04-203-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to support Oracle database support identity data type Oracle database does not support `INSERT .. DEFAULT VALUES` then every insert statement needs at least one column name specified. When `prefetch_primary_key?` returns `true` insert statement always have the primary key name since the primary key value is selected from the associated sequence. However, supporting identity data type will make `prefetch_primary_key?` returns `false` then no primary key column name added. As a result, `empty_insert_statement_value` raises `NotImplementedError` To address this error `empty_insert_statement_value` can take one argument `primary_key` to generate insert statement like this. `INSERT INTO "POSTS" ("ID") VALUES(DEFAULT)` It needs arity change for the public method but no actual behavior changes for the bundled adapters. Oracle enhanced adapter `empty_insert_statement_value` implementation will be like this: ``` def empty_insert_statement_value(primary_key) raise NotImplementedError unless primary_key "(#{quote_column_name(primary_key)}) VALUES(DEFAULT)" end ``` [Raise NotImplementedError when using empty_insert_statement_value with Oracle](https://github.com/rails/rails/pull/28029) [Add support for INSERT .. DEFAULT VALUES](https://community.oracle.com/ideas/13845)
* | | Merge pull request #32665 from albertoalmagro/fix-typos-filter-parametersRafael França2018-04-202-3/+3
|\ \ \ | | | | | | | | Fix typos related to ActionDispatch::Http::FilterParameters
| * | | Fix typo on method nameAlberto Almagro2018-04-201-1/+1
| | | |
| * | | [ci skip] Fix doc typos ActionDispatch::Http::FilterParametersAlberto Almagro2018-04-201-2/+2
| | | | | | | | | | | | | | | | Fixes two documentation typos found at ActionDispatch::Http::FilterParameters
* | | | Merge pull request #23868 from gsamokovarov/debug-exceptions-interceptorsRafael França2018-04-203-1/+59
|\ \ \ \ | | | | | | | | | | Introduce ActionDispatch::DebugExceptions interceptors
| * | | | Introduce ActionDispatch::DebugExceptions interceptorsGenadi Samokovarov2018-04-203-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Plugins interacting with the exceptions caught and displayed by ActionDispatch::DebugExceptions currently have to monkey patch it to get the much needed exception for their calculation. With DebugExceptions.register_interceptor, plugin authors can hook into DebugExceptions and process the exception, before being rendered. They can store it into the request and process it on the way back of the middleware chain execution or act on it straight in the interceptor. The interceptors can be play blocks, procs, lambdas or any object that responds to `#call`.
* | | | | Merge pull request #32659 from utilum/ambiguous_first_argumentAndrew White2018-04-201-1/+1
|\ \ \ \ \ | |_|/ / / |/| | | | 2.6 warning: ambiguous first argument
| * | | | warning: ambiguous first argument; put parentheses or a space even after `/' ↵utilum2018-04-201-1/+1
|/ / / / | | | | | | | | | | | | operator
* | | | Merge pull request #32642 from bogdanvlviv/fix-name-test-added-by-32613Andrew White2018-04-201-1/+1
|\ \ \ \ | |/ / / |/| | | Fix name of the test added by #32613
| * | | Fix name of the test added by #32613bogdanvlviv2018-04-191-1/+1
| | | |
* | | | Make JS views rendered work with content security policyyuuji.yaginuma2018-04-202-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of now, `HTMLElement.nonce` seems to work only in Chrome. So, it should not be used now. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/nonce#Browser_compatibility Fixes #32577.
* | | | Merge pull request #32575 from ybakos/guides/testing/pluralize_class_namesRafael França2018-04-191-3/+3
|\ \ \ \ | | | | | | | | | | guides/testing: Pluralize controller and helper class names.
| * | | | guides/testing: Pluralize controller and helper class names.Yong Bakos2018-04-141-3/+3
| | |_|/ | |/| | | | | | | | | | | | | | | | | | The Rails convention for controllers and helpers is plural, except where intentionally singular. Pluralize the controller and helper class names, to match convention.
* | | | Merge pull request #32650 from bogdanvlviv/return_back_slash_and_use___dir__Rafael França2018-04-192-2/+2
|\ \ \ \ | | | | | | | | | | Return back "/" to the end of RAILS_GEM_ROOT
| * | | | Return back "/" to the end of RAILS_GEM_ROOTbogdanvlviv2018-04-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The "/" was removed in 40bdbce191ad90dfea43dad51fac5c4726b89392 during refactoring. It may cause regression since looks like was added intentionaly because it is possible that a name of any another gem can start with /rails/, so slash was added to ensure that it is "rails" gem. I would like to backport this to `5-2-stable` too. - Use `__dir__` instead of `__FILE__`. Follow up #29176.
* | | | | Merge pull request #32574 from DmytroVasin/rails-ujs-stoppable-eventsRafael França2018-04-199-64/+73
|\ \ \ \ \ | | | | | | | | | | | | Rails-ujs: Info about stoppable events
| * | | | | Fix stoppable events in tests and docs.Dmytro Vasin2018-04-149-64/+73
| | |/ / / | |/| | |
* | | | | Revert "Merge pull request #32652 from ↵Rafael Mendonça França2018-04-191-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bogdanvlviv/add-missing-changelog-for-32593" This reverts commit 78ff47f3e77925f72d98579da6feb68f36052ad8, reversing changes made to daffe03308bffc43ea343a886aab33082d83bb9c. That changelog entry should only be on 5-2-stable
* | | | | Merge pull request #32649 from rails/universal-ruby-versionGuillermo Iguaran2018-04-192-2/+2
|\ \ \ \ \ | | | | | | | | | | | | Create a .ruby-version compatible with MRI/JRuby by default
| * | | | | Create a .ruby-version compatible with MRI/JRuby by defaultGuillermo Iguaran2018-04-192-2/+2
| | |/ / / | |/| | |
* | | | | Don't expose `Relation#preload_associations` in the docRyuta Kamizono2018-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The extracted method is used for `CollectionCacheAssociationLoading`, still not public API. [ci skip]
* | | | | Merge pull request #32654 from ↵Ryuta Kamizono2018-04-201-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | yahonda/suppress_ambiguous_first_argument_at_default_scoping_test Suppress `warning: ambiguous first argument`
| * | | | | Use assert_no_match for test_order_to_unscope_reorderingYasuo Honda2018-04-201-1/+1
| | |_|_|/ | |/| | |
* | | | | Merge pull request #32652 from bogdanvlviv/add-missing-changelog-for-32593Ryuta Kamizono2018-04-201-0/+12
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | Add missing changelog entry [ci skip]
| * | | | Add missing changelog entrybogdanvlviv2018-04-201-0/+12
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/rails/rails/pull/32593 was backported to `5-2-stable` but since 5.2.0 is released the changelog entry should be in Rails 6.0.0 too. [ci skip]
* | | | Merge pull request #32645 from maneframe/skip_query_cache_mergeRafael Mendonça França2018-04-192-2/+6
|\ \ \ \ | |/ / / |/| | | | | | | Fix relation merging with skip_query_cache!
| * | | Fix relation merging with skip_query_cache!James Williams2018-04-193-3/+11
| | | |
* | | | Merge pull request #32648 from ↵Rafael França2018-04-196-13/+13
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | bogdanvlviv/improve-pattern-filenames-to-catch-more-style-offences Allow rubocop check more files
| * | | | Allow rubocop check more filesbogdanvlviv2018-04-196-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fix pattern of filenames for `CustomCops/AssertNot` and `CustomCops/RefuteNot`. rubocop should check every file under `test/`. Related to #32441, #32605
* | | | | Merge pull request #32168 from christianblais/activesupport-ordinalize-i18nRafael França2018-04-194-13/+59
|\ \ \ \ \ | |/ / / / |/| | | | `#ordinal` and `#ordinalize` now support I18n
| * | | | `ActiveSupport::Inflector#ordinal` and `ActiveSupport::Inflector#ordinalize`Christian Blais2018-03-054-13/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | now support translations through I18n. { fr: { number: { nth: { ordinals: lambda do |_key, number:, **_options| if number.to_i.abs == 1 'er' else 'e' end end, ordinalized: lambda do |_key, number:, **_options| "#{number}#{ActiveSupport::Inflector.ordinal(number)}" end } } } }
* | | | | Merge pull request #32401 from yhirano55/improve_css_in_guideRafael França2018-04-192-12/+2
|\ \ \ \ \ | | | | | | | | | | | | Improve css in guide
| * | | | | Improve css in guideYoshiyuki Hirano2018-04-012-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * .clearfix is overridden. * .clear is not currently used. * #extraCol is not currently used. * table th, table td are overridden. Merged them. * Removed needless comment lines which are added on #6475
* | | | | | Merge pull request #32636 from yhirano55/improve_line_tasksRafael França2018-04-192-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Improve redundancy in line tasks
| * | | | | | Improve redundancy in line tasksYoshiyuki Hirano2018-04-192-2/+2
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | * Remove needless concat from actionpack/Rakefile * Remove neesless File.join from actionview/Rakefile
* | | | | | [ci skip] Restore of links in RDOC_MAIN after an update of the file (#32644)Felipe Tovar2018-04-191-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ci skip] Update links in RDOC_MAIN and remove style of word rails in README * [ci skip] Update links in RDOC_MAIN and remove style of word rails in README [Felipe Tovar & Rafael Mendonça França]
* | | | | | Merge pull request #32593 from sdhull/fix-strong-params-permit-bangRafael Mendonça França2018-04-192-2/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Fixes StrongParameters `permit!` to work with nested arrays
| * | | | | | Fixes StrongParameters permit! to work with nested arraysSteve Hull2018-04-163-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `permit!` is intended to mark all instances of `ActionController::Parameters` as permitted, however nested arrays of params were not being marked permitted because the method did shallow iteration. This fixes that by flattening the array before calling `permit!` on all each item.
* | | | | | | Merge pull request #32605 from composerinteralia/assert-notRafael França2018-04-19104-338/+429
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Add RuboCop for `assert_not` over `assert !`
| * | | | | | | Replace `assert !` with `assert_not`Daniel Colson2018-04-1998-328/+328
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This autocorrects the violations after adding a custom cop in 3305c78dcd.
| * | | | | | | Add RuboCop for `assert_not` over `assert !`Daniel Colson2018-04-196-10/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We added `assert_not` in f75addd "to replace warty 'assert !foo'". fa8d35b agrees that it is warty, and so do I. This custom Rubocop rule turns the wart into a violation. As with my last custom cop, https://github.com/rails/rails/pull/32441, I want to make sure this looks right on code climate before pushing another commit to autocorrect everything. @toshimaru I just noticed https://github.com/toshimaru/rubocop-rails/pull/26 Is there a better way to add these custom cops, or were you saying we shouldn't have custom cops at all?
* | | | | | | | Merge pull request #32637 from yhirano55/add_exclude_condition_in_rubocopRafael França2018-04-191-0/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add exculude condition in rubocop.yml
| * | | | | | | | Add exculude condition in rubocop.ymlYoshiyuki Hirano2018-04-201-0/+1
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Excluded `railties/test/fixtures/tmp/**/*` from rubocop inspect files * These files are generated after running test in railties