aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | The name of the key on the owner is abstracted as `reflection.join_foreign_key`Ryuta Kamizono2017-09-184-17/+5
| | | | | | | | |
* | | | | | | | | Extract `associate_records_to_owner` to refactor `Preloader::Association`Ryuta Kamizono2017-09-183-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we have `Preloader#preload`, `Preloader::Association#preload` is a little confusing. And also, since the `preload` method is an abstract method, it is hard to read where `associated_records_by_owner` is called. This refactors `Preloader::Association` to ease to read where `associated_records_by_owner` is called.
* | | | | | | | | Merge pull request #30639 from ↵George Claghorn2017-09-171-2/+0
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | yhirano55/remove_unused_require_in_activestorage_variation Remove unused require in ActiveStorage::Variation
| * | | | | | | | | Remove unused require in ActiveStorage::VariationYoshiyuki Hirano2017-09-181-2/+0
| | |_|_|_|/ / / / | |/| | | | | | |
* | | | | | | | | Fix collided sequence name detectionRyuta Kamizono2017-09-182-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If collided named sequence already exists, newly created serial column will generate alternative sequence name. Fix sequence name detection to allow the alternative names.
* | | | | | | | | Remove the code that swapping `scope` and `options`Ryuta Kamizono2017-09-182-8/+3
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | `options` is never assigned to `scope` as long as using splat hash.
* | | | | | | | `id` (primary key) is not only an integer [ci skip]Ryuta Kamizono2017-09-181-1/+1
| | | | | | | |
* | | | | | | | Ensure returning affected objects for class level `update` and `destroy`Ryuta Kamizono2017-09-182-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Class level `update` and `destroy` are using `find` in the internal, so it will raise `RecordNotFound` if given ids cannot find an object even though the method already affect (update or destroy) to any objects. These methods should return affected objects even in that case.
* | | | | | | | Place class level `update`, `destroy`, and `delete` in ↵Ryuta Kamizono2017-09-183-95/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Persistence::ClassMethods` The docs are obviously for class level `update`, `destroy`, and `delete`. It should be placed in `Persistence::ClassMethods` rather than `Relation`. And also, these methods are not dependent on relation. So it is not needed to delegate to `all` (plus, `klass.find` is faster than `relation.find`).
* | | | | | | | Early return if `records.empty?` in `Preloader#preload`Ryuta Kamizono2017-09-181-3/+3
| | | | | | | |
* | | | | | | | Don't pass `reflection_scope` to `preload_scope` if `reflection.scope` isn't ↵Ryuta Kamizono2017-09-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | given Related 2b5f5cdd7c1d95716de6a206b6d09ccbb006dc17. If `reflection.scope` isn't given, `reflection_scope` is always empty scope. It is unnecessary to merge it.
* | | | | | | | Return `through_scope` only if the scope is not empty scopeRyuta Kamizono2017-09-181-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related 2b5f5cdd7c1d95716de6a206b6d09ccbb006dc17. If `through_scope` is empty scope, it is unnecessary to merge it. And also, comparing relations is a little expensive (will cause `build_arel`). It is enough to use `empty_scope?` to determine whether empty scope.
* | | | | | | | Remove useless condition in `reset_association`Ryuta Kamizono2017-09-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `through_scope` is not empty scope if `options[:source_type]` is given.
* | | | | | | | Merge pull request #30637 from ↵Ryuta Kamizono2017-09-181-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bogdanvlviv/add_round_bracket_in_5_1_release_notes Add missing round bracket in "Ruby on Rails 5.1 Release Notes" guide [ci skip]
| * | | | | | | | Add missing round bracket in "Ruby on Rails 5.1 Release Notes" guidebogdanvlviv2017-09-171-1/+1
| | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | Merge pull request #30633 from yhirano55/add_mini_magick_to_app_generatorRyuta Kamizono2017-09-182-0/+7
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add `mini_magick` to default `Gemfile` as comment
| * | | | | | | | Add `mini_magick` to default `Gemfile` as commentYoshiyuki Hirano2017-09-172-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * If we want to transform image on ActiveStorage, we should bundle `mini_magick`. * I've added comment block to default `Gemfile` to be easier to install this.
* | | | | | | | | Merge pull request #30632 from dixpac/fix_migration_rollback_docsRyuta Kamizono2017-09-181-2/+2
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix docs describing rollback [ci skip]
| * | | | | | | | | Fix docs describing rollback [ci skip]dixpac2017-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * `rails db:migrate STEP = 2` will not rollback the migrations, instead `rails db:rollback STEP = 2` will do the rollback. * Also, rewritten `rails db:migrate VERSION` => `rails db:rollback VERSION` for consistency.
* | | | | | | | | | Merge pull request #30630 from ydakuka/patch-1Ryuta Kamizono2017-09-171-1/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Update plugins.md [ci skip]
| * | | | | | | | | | Update plugins.md [ci skip]Yauheni Dakuka2017-09-171-1/+1
| | |/ / / / / / / / | |/| | | | | | | |
* | | | | | | | | | Merge pull request #30628 from yhirano55/add_local_option_to_message_formRyuta Kamizono2017-09-171-1/+1
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | Add local option to Message form [ci skip]
| * | | | | | | | | Add local option to Message form [ci skip]Yoshiyuki Hirano2017-09-171-1/+1
| | |_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MessagesController redirects to `GET /message/:id`. * It looks it don't expect XHR request. * `form_with` behaves for XHR by default. * I've added `local: true` option to `form_with`.
* | | | | | | | | Merge pull request #30626 from yhirano55/fix_activestorage_readmeKasper Timm Hansen2017-09-173-3/+3
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | Fix file missing in activestorage's example code [ci skip]
| * | | | | | | | Fix file missing in activestorage's example code [ci skip]Yoshiyuki Hirano2017-09-173-3/+3
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * File.open("~/face.jpg") raise error: `Errno::ENOENT: No such file or directory @ rb_sysopen - ~/face.jpg`
* | | | | | | | Merge pull request #30609 from y-yagi/add_tests_for_credentials_commandKasper Timm Hansen2017-09-171-0/+19
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Add tests for credentials command
| * | | | | | | Add tests for credentials commandyuuji.yaginuma2017-09-151-0/+19
| | | | | | | |
* | | | | | | | Merge pull request #30625 from ↵Ryuta Kamizono2017-09-1712-24/+0
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | y-yagi/remove_frozen_string_literal_from_templates Remove frozen_string_literal magic comment from templates
| * | | | | | | Remove frozen_string_literal magic comment from templatesyuuji.yaginuma2017-09-1712-24/+0
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | Follow up of #30348
* | | | | | | Merge pull request #30617 from y-yagi/dont_expose_activestorage_routesGeorge Claghorn2017-09-162-33/+18
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | Don't expose Active Storage routes
| * | | | | | Don't expose Active Storage routesyuuji.yaginuma2017-09-162-33/+18
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These routes are only used internally in Active Storage, and it seems that there is no need for the user to directly use them. Therefore, I think that routes should not be exposed to users.
* | | | | | Merge pull request #30618 from y-yagi/fix_credentailsRyuta Kamizono2017-09-161-3/+3
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Fix typo: `credentails` -> `credentials` [ci skip]
| * | | | | Fix typo: `credentails` -> `credentials` [ci skip]yuuji.yaginuma2017-09-161-3/+3
| |/ / / / | | | | | | | | | | | | | | | Follow up of ca18922ac23be2cde6963fae9b193c9111bec6f8
* | | | | Merge pull request #30608 from yhirano55/add_local_option_to_form_withKasper Timm Hansen2017-09-151-4/+4
|\ \ \ \ \ | |/ / / / |/| | | | Update Getting Started with Rails [ci skip]
| * | | | Update Getting Started with Rails [ci skip]Yoshiyuki Hirano2017-09-151-4/+4
|/ / / /
* | | | Remove stopgap_13632 entirely for now: it doesn't support 2.2.8Matthew Draper2017-09-151-3/+0
| | | |
* | | | Stick with the RUBY_VERSION check on stopgap_13632Matthew Draper2017-09-152-3/+1
| | | |
* | | | Bump Travis to new Ruby releasesMatthew Draper2017-09-152-11/+11
| | | | | | | | | | | | | | | | | | | | Most interesting to us, 2.4.2 and 2.3.5 include the fix for https://bugs.ruby-lang.org/issues/13632
* | | | Inline the lone add_master_key_file_silently use.Kasper Timm Hansen2017-09-141-5/+1
| | | |
* | | | Merge pull request #30582 from y-yagi/do_no_add_master_key_and_credentialsKasper Timm Hansen2017-09-141-0/+4
|\ \ \ \ | | | | | | | | | | Do not add master key and credentials when `pretend` option is specified
| * | | | Do not add master key and credentials when `pretend` option is specifiedyuuji.yaginuma2017-09-121-0/+4
| | | | |
* | | | | Merge pull request #30581 from y-yagi/do_not_add_master_key_twice_to_gitignoreKasper Timm Hansen2017-09-144-17/+45
|\ \ \ \ \ | | | | | | | | | | | | Make master key added to gitignore the same value as when creating appplication
| * | | | | Make master key added to gitignore the same value as when creating appplicationyuuji.yaginuma2017-09-144-17/+45
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For gitignore generated by `rails new`, key with a leading slash is specified. https://github.com/rails/rails/blob/69f976b859cae7f9d050152103da018b7f5dda6d/railties/lib/rails/generators/rails/app/templates/gitignore#L11 Therefore, when executing `credentials:edit`, also need leading slack. In order to avoid such a difference, fixed to use same method for `rails new` and `credentials:edit`.
* | | | | Avoid making HTTP requests to generate signed URLs for GCS objectsGeorge Claghorn2017-09-131-3/+3
| | | | |
* | | | | Remove unused explicit delegation to `klass` in `relation`Ryuta Kamizono2017-09-143-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is only used `primary_key` and `connection` in the internal, so it is not needed to delegate others to `klass` explicitly. This doesn't change public behavior because `relation` will delegate missing method to `klass`.
* | | | | Don't use `collection.table_name` in `collection_cache_key`Ryuta Kamizono2017-09-142-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | Because `collection.table_name` doesn't respect table alias. Use `collection.arel_attribute` instead.
* | | | | Merge pull request #30598 from yhirano55/update_activejob_basicsRyuta Kamizono2017-09-141-0/+1
|\ \ \ \ \ | | | | | | | | | | | | Update Active Job Basics [ci skip]
| * | | | | Update Active Job Basics [ci skip]Yoshiyuki Hirano2017-09-141-0/+1
| | |_|/ / | |/| | | | | | | | | | | | | * Add Sneakers link to documentation list.
* | | | | Don't use `quoted_table_name` in `limited_ids_for`Ryuta Kamizono2017-09-142-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because `quoted_table_name` doesn't respect table alias. We should use `arel_attribute` for that, so I added `column_name_from_arel_node` to generate column name from an arel node.
* | | | | Merge pull request #30596 from yahonda/address_test_or_with_bind_params_failureRyuta Kamizono2017-09-141-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Address random `test_or_with_bind_params` failures