aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update results of command in Testing guides [ci skip]Yoshiyuki Hirano2018-04-231-13/+14
| | | | | * Results of command in testing guides are different from actual ones. * Updated them.
* Merge pull request #31554 from fatkodima/controller_generator_suffixGuillermo Iguaran2018-04-222-1/+33
|\ | | | | Gracefully handle extra "controller" when generating controller
| * Gracefully handle extra "controller" when generating controllerfatkodima2018-03-232-1/+33
| |
* | Strip duplicated suffixes more strictlyRyuta Kamizono2018-04-226-6/+6
| | | | | | | | In the previous code incorrectly removes intermediate words.
* | Merge pull request #32681 from bdewater/rubocop-0-54Ryuta Kamizono2018-04-226-15/+15
|\ \ | | | | | | Rubocop 0.54
| * | Fix Style/RedundantReturn offensesBart de Water2018-04-213-3/+3
| | |
| * | Rubocop 0.54Bart de Water2018-04-213-12/+12
| | | | | | | | | | | | Fix `.rubocop.yml: Lint/EndAlignment has the wrong namespace - should be Layout` warning
* | | Merge pull request #32685 from yhirano55/fix-duplicated-suffix-for-job-generatorRyuta Kamizono2018-04-223-0/+19
|\ \ \ | | | | | | | | Fix duplicated suffix for JobGenerator
| * | | Fix duplicated suffix for JobGeneratorYoshiyuki Hirano2018-04-223-0/+19
| | | |
* | | | Merge pull request #32687 from yhirano55/add-generator-test-case-to-channelRyuta Kamizono2018-04-221-0/+10
|\ \ \ \ | | | | | | | | | | Add test case to ChannelGeneratorTest
| * | | | Add test case to ChannelGeneratorTestYoshiyuki Hirano2018-04-221-0/+10
|/ / / / | | | | | | | | | | | | * Add a test case to ensure avoid duplicated suffix in channel generator
* / / / Fix typo in constant name [ci skip]yuuji.yaginuma2018-04-221-1/+1
|/ / /
* | | Merge pull request #32673 from eugeneius/raw_post_multiple_requestsGeorge Claghorn2018-04-212-4/+13
|\ \ \ | | | | | | | | Reset RAW_POST_DATA between test requests
| * | | Reset RAW_POST_DATA between test requestsEugene Kenny2018-04-202-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | `RAW_POST_DATA` is derived from the `rack.input` header, which changes with each test request. It needs to be cleared in `scrub_env!`, or all requests within the same test will see the value from the first request.
* | | | Using existing models for building multiple has_one through testsRyuta Kamizono2018-04-227-54/+15
| | | | | | | | | | | | | | | | Follow up of #32514.
* | | | Merge pull request #32514 from ↵Ryuta Kamizono2018-04-227-1/+64
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | samdec/multiple-has-one-through-associations-build-bug Fix .new with multiple through associations
| * | | Fix .new with multiple through associationsSam DeCesare2018-04-097-1/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug with building an object that has multiple `has_many :through` associations through the same object. Previously, when building the object via .new, the intermediate object would be created instead of just being built. Here's an example: Given a GameBoard, that has_one Owner and Collection through Game. The following line would cause a game object to be created in the database. GameBoard.new(owner: some_owner, collection: some_collection) Whereas, if passing only one of those associations into `.new` would cause the Game object to be built and not created in the database. Now the above code will only build the Game object, and not save it.
* | | | `target` in `CollectionAssociation` is always an arrayRyuta Kamizono2018-04-211-2/+2
| | | | | | | | | | | | | | | | | | | | So `target.is_a?(Array)` is meaningless, and just use `target.empty?` instead of `target.blank?`.
* | | | Add test case for `collection.size` with dirty targetRyuta Kamizono2018-04-211-0/+10
| | | |
* | | | Fix typo in the `touch_all` doc [ci skip]Ryuta Kamizono2018-04-211-4/+4
| | | |
* | | | Merge pull request #32674 from composerinteralia/relax-assertionRyuta Kamizono2018-04-211-2/+2
|\ \ \ \ | |_|/ / |/| | | Relax assertions in connection config tests
| * | | Relax assertions in connection config testsDaniel Colson2018-04-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment these two ActiveRecord tests pass with `rake test:sqlite3`, but fail with `ARCONN=sqlite3 bin/test`. `Rails.root` is defined when running `bin/test`, but not when running the rake task. When `Rails.root` is defined, `config[:database]` will look something like `vagrant/rails/activerecord/db/primary.sqlite3` instead of just `db/primary.sqlite3`. (See https://github.com/rails/rails/blob/00caf95e14b90782ab17fbd6d2b930844df99980/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L27) Relaxing `assert_equal` to `assert_match` will allow these tests to pass regardless of how they are run. I do have a question why we need both ways to run tests. I have been using `bin/test` lately, but I see from #32426 that this is not the preferred method.
* | | | Merge pull request #32655 from ↵Rafael Mendonça França2018-04-204-10/+51
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | robotdana/preload-through-polymorphic-associations Preloading through polymorphic associations (still raises for typos on regular associations)
| * | | | Can preload associations through polymorphic associationsDana Sherson2018-04-204-10/+51
|/ / / /
* | | | Merge pull request #31513 from fatkodima/relation-touch_allRafael França2018-04-204-11/+101
|\ \ \ \ | | | | | | | | | | Add `touch_all` method to `ActiveRecord::Relation`
| * | | | Add `touch_all` method to `ActiveRecord::Relation`fatkodima2018-04-134-11/+101
| | | | |
* | | | | Merge pull request #29286 from vinistock/create_missing_exact_template_exceptionRafael Mendonça França2018-04-208-20/+44
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Create MissingExactTemplate exception with separate template
| * | | | | Create MissingExactTemplate exception with separate templateVinicius Stock2018-04-207-20/+37
| | | | | |
* | | | | | 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.