aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Updated links from http to https in guides, docs, etcAbhay Nikam2019-03-0926-34/+34
|
* Merge pull request #35522 from gmcgibbon/rails_db_system_change_versioningKasper Timm Hansen2019-03-082-5/+30
|\ | | | | Add version awareness to rails db:system:change
| * Add version awareness to rails db:system:changeGannon McGibbon2019-03-082-5/+30
| |
* | Merge pull request #35523 from y-yagi/build_assets_automatically_when_needYuji Yaginuma2019-03-081-0/+7
|\ \ | |/ |/| Build assets automatically if necessary
| * Build assets automatically if necessaryyuuji.yaginuma2019-03-081-0/+7
|/ | | | | | In CI, these are unnecessary because done by preprocessing. To test locally, you need to do it manually. If assets not exist, it will fail when a run specific test, so force to build those only when necessary.
* Merge pull request #35516 from soartec-lab/update_multiline_sample_codeRyuta Kamizono2019-03-081-2/+2
|\ | | | | Update `multiline?` sample code [ci skip]
| * Update `multiline?` sample code [ci skip]soartec-lab2019-03-071-2/+2
|/
* Merge pull request #35515 from soartec-lab/fix_sum_method_sample_codeRyuta Kamizono2019-03-071-1/+1
|\ | | | | Corrected execution result of Enumerable#sum [ci skip]
| * Corrected execution result of Enumerable#sum [ci skip]soartec-lab2019-03-071-1/+1
|/
* Merge pull request #35512 from kamipo/delegate_onlyRyuta Kamizono2019-03-073-2/+6
|\ | | | | Delegate `only` query method to relation as with `except`
| * Delegate `only` query method to relation as with `except`Ryuta Kamizono2019-03-073-2/+6
| | | | | | | | | | | | | | | | | | | | | | I've found the skewness of delegation methods between `except` and `only` in a88b6f2. The `only` method is closely similar with `except` as `SpawnMethods`. https://github.com/rails/rails/blob/e056b9bfb07c4eb3bcc6672d885aadd72bec574f/activerecord/lib/active_record/relation/spawn_methods.rb#L53-L67 It is preferable both behaves the same way.
* | Merge pull request #35514 from soartec-lab/learn_more_about_inflectionsVipul A M2019-03-071-1/+1
|\ \ | | | | | | Learn more about inflections[ci skip]
| * | Learn more about inflections[ci skip]soartec-lab2019-03-071-1/+1
| | |
* | | Merge pull request #35513 from utilum/update_raccRyuta Kamizono2019-03-071-1/+1
|\ \ \ | |/ / |/| | Update racc to latest version
| * | Update racc to latest versionutilum2019-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | racc 1.4.15 includes fixes for compiling with Ruby 2.7 since [ruby/ruby@3d1c86a](https://github.com/ruby/ruby/commit/3d1c86a). Before: ``` ruby -v ruby 2.7.0dev (2019-03-07 trunk 67189) [x86_64-linux] bundle install ... Fetching racc 1.4.14 Installing racc 1.4.14 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/racc-1.4.14/ext/racc /home/u/.rbenv/versions/2.7.0-dev/bin/ruby -I /home/u/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0 -r ./siteconf20190307-14242-16jzp6c.rb extconf.rb checking for rb_ary_subseq()... yes creating Makefile current directory: /home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/racc-1.4.14/ext/racc make "DESTDIR=" clean current directory: /home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/racc-1.4.14/ext/racc make "DESTDIR=" make: *** No rule to make target '/home/u/.rbenv/versions/2.7.0-dev/include/ruby-2.7.0/defines.h', needed by 'cparse.o'. Stop. make failed, exit code 2 Gem files will remain installed in /home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/racc-1.4.14 for inspection. Results logged to /home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/extensions/x86_64-linux/2.7.0-static/racc-1.4.14/gem_make.out An error occurred while installing racc (1.4.14), and Bundler cannot continue. Make sure that `gem install racc -v '1.4.14' --source 'https://rubygems.org/'` succeeds before bundling. In Gemfile: racc ```
* | | Merge pull request #35503 from samjohn/cannot-grammar-correctionXavier Noria2019-03-077-7/+7
|\ \ \ | |_|/ |/| | Replace “can not” with “cannot”.
| * | Replace “can not” with “cannot”.Samantha John2019-03-067-7/+7
| | |
* | | Refactor AR::Querying to extract `QUERYING_METHODS` listRyuta Kamizono2019-03-072-27/+33
| |/ |/| | | | | This makes to ease testing `QUERYING_METHODS`.
* | Fix incorrect identifier quoting [ci skip]Ryuta Kamizono2019-03-072-5/+5
| |
* | Merge pull request #35508 from ↵Ryuta Kamizono2019-03-071-0/+2
|\ \ | | | | | | | | | | | | cjlarose/add-explicit-require-in-actiontext-initializer Explicitly require rails-html-sanitizer gem in ActionText helpers
| * | Explicitly require rails-html-sanitizer gem in ActionText helpersChris LaRose2019-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the [`action_text.helper` initializer][0] runs after `ActionController::Base` has been loaded, but before the `rails-html-sanitizer` gem has been `require`d, then the reference to the constant `Rails::Html` in the body of the `ActionText::ContentHelper` module raises an `uninitialized constant` exception. [0]: https://github.com/rails/rails/blob/21703382393c87212c27c988420ee5c133c1aa9f/actiontext/lib/action_text/engine.rb#L31-L35
* | | Merge pull request #35510 from shailesh-kalamkar/fix-typosRyuta Kamizono2019-03-072-2/+2
|\ \ \ | | | | | | | | [ci skip] Fix typos
| * | | [ci skip] Fix typosShailesh Kalamkar2019-03-072-2/+2
|/ / /
* | | Correct the limitation about `order` with `distinct` in the guideRyuta Kamizono2019-03-071-1/+2
| | | | | | | | | | | | | | | | | | | | | That is happened with `distinct`, and that is not only happened on MyS L, but also on PostgreSQL, SQL Server, and Oracle. [ci skip]
* | | Just inherit `ForeignKeyChangeColumnTest` for with prefix/suffix testsRyuta Kamizono2019-03-071-17/+5
| | |
* | | Move all Arel constructions from uniqueness validator into connection adapterRyuta Kamizono2019-03-073-7/+6
| | |
* | | Merge pull request #35509 from willnet/fix-typo-in-persistenceRyuta Kamizono2019-03-071-2/+2
|\ \ \ | |/ / |/| | [ci skip]Fix typo: constaint -> constraint
| * | [ci skip]Fix typo: constaint -> constraintwillnet2019-03-071-2/+2
|/ /
* | Merge pull request #35498 from sobrinho/fix-including-excluding-flattenRyuta Kamizono2019-03-074-7/+10
|\ \ | |/ |/| Fix including/excluding flattening
| * Fix including/excluding flatteningGabriel Sobrinho2019-03-064-7/+10
| |
* | Merge pull request #35492 from nsuchy/patch-1Rafael França2019-03-0630-109/+109
|\ \ | | | | | | Update links and code examples in the guides to use HTTPS
| * | Update links and code examples in the guides to use HTTPS where the host ↵Nathaniel Suchy2019-03-0630-109/+109
| |/ | | | | | | supports it.
* | Bump ZeitwerkXavier Noria2019-03-062-3/+3
| |
* | Merge pull request #35497 from eileencodes/parse-yaml-without-erb-for-rake-tasksEileen M. Uchitelle2019-03-064-13/+40
|\ \ | | | | | | Load YAML for rake tasks without parsing ERB
| * | Load YAML for rake tasks without parsing ERBeileencodes2019-03-064-13/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a new method that loads the YAML for the database config without parsing the ERB. This may seem odd but bear with me: When we added the ability to have rake tasks for multiple databases we started looping through the configurations to collect the namespaces so we could do `rake db:create:my_second_db`. See #32274. This caused a problem where if you had `Rails.config.max_threads` set in your database.yml it will blow up because the environment that defines `max_threads` isn't loaded during `rake -T`. See #35468. We tried to fix this by adding the ability to just load the YAML and ignore ERB all together but that caused a bug in GitHub's YAML loading where if you used multi-line ERB the YAML was invalid. That led us to reverting some changes in #33748. After trying to resolve this a bunch of ways `@tenderlove` came up with replacing the ERB values so that we don't need to load the environment but we also can load the YAML. This change adds a DummyCompiler for ERB that will replace all the values so we can load the database yaml and create the rake tasks. Nothing else uses this method so it's "safe". DO NOT use this method in your application. Fixes #35468
* | | Add some whitespace for readability.Kasper Timm Hansen2019-03-062-0/+14
| | |
* | | Fix test case name after file extractionKasper Timm Hansen2019-03-061-1/+1
| | | | | | | | | | | | | | | Although the old name had a certain persistence, this ain't the kind of file we're in now.
* | | Handle blank inserts like update_all; raise upfront.Kasper Timm Hansen2019-03-062-7/+5
| | |
* | | Allow `remove_foreign_key` with both `to_table` and `options`Ryuta Kamizono2019-03-067-33/+32
| |/ |/| | | | | | | | | | | Foreign keys could be created to the same table. So `remove_foreign_key :from_table, :to_table` is sometimes ambiguous. This allows `remove_foreign_key` to remove the select one on the same table with giving both `to_table` and `options`.
* | Merge pull request #35491 from abhaynikam/35077-fix-insert-many-doc-typoPrem Sichanugrist2019-03-061-1/+1
|\ \ | | | | | | [ci skip] Fix typo `beacuse` -> `because`
| * | [ci skip] Fix typo beacuse -> becauseAbhay Nikam2019-03-061-1/+1
|/ /
* | Enable `Lint/AmbiguousOperator` and `Lint/AmbiguousRegexpLiteral` copsRyuta Kamizono2019-03-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | To avoid newly adding the warnings, which are frequently addressed. ac721c855203ac7570545c0e85fe086f8e94d94a 951383bd9afa4a71c17e56d1d4eb5866da851483 8a0f235fd3bd3f3c813fa7034c6d741831e55c3e c33c03e80cbe9f27274b45fe55f93bad3af988fb 424b2019830ea4c08e86ba9ff9600aa23a54cb4f
* | Enable `Performance/ReverseEach` cop to avoid newly adding `reverse.each`Ryuta Kamizono2019-03-061-0/+3
| | | | | | | | https://github.com/rails/rails/pull/35451#discussion_r262746834
* | Merge branch 'master' of github.com:rails/railsDavid Heinemeier Hansson2019-03-055-26/+25
|\ \
| * | Ensure `clear_cache!` clears the prepared statements cacheRyuta Kamizono2019-03-065-26/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since #23461, all adapters supports prepared statements, so that clears the prepared statements cache is no longer database specific. Actually, I struggled to identify the cause of random CI failure in #23461, that was missing `@statements.clear` in `clear_cache!`. This extracts `clear_cache!` to ensure the common concerns in the abstract adapter.
* | | Added Array#including, Array#excluding, Enumerable#including, ↵David Heinemeier Hansson2019-03-055-11/+77
|/ / | | | | | | Enumerable#excluding
* / Add insert_all to ActiveRecord models (#35077)Bob Lail2019-03-0512-17/+613
|/ | | | | Adds a method to ActiveRecord allowing records to be inserted in bulk without instantiating ActiveRecord models. This method supports options for handling uniqueness violations by skipping duplicate records or overwriting them in an UPSERT operation. ActiveRecord already supports bulk-update and bulk-destroy actions that execute SQL UPDATE and DELETE commands directly. It also supports bulk-read actions through `pluck`. It makes sense for it also to support bulk-creation.
* Reset `connection_handlers` to default when any test dirties thatRyuta Kamizono2019-03-051-0/+4
| | | | | | | | | Most existing tests expects `connection_handlers` has only one default handler, but the test added at #34779 dirties that. We need to reset `connection_handlers` to default in that case. Closes #35471.
* Decrypt the ASt test config if availableMatthew Draper2019-03-051-0/+8
|
* Merge pull request #35473 from rmacklin/patch-1Ryuta Kamizono2019-03-051-1/+1
|\ | | | | | | | | Fix Getting Started guide to state the correct number of files created by the controller generator [ci skip]