- 07 11月, 2017 20 次提交
-
-
由 yuuji.yaginuma 提交于
`ScaffoldBase` was changed to `ResourceHelpers` by 0efedf2a.
-
由 Rafael França 提交于
Add cases to test combining validation conditions
-
由 Rafael França 提交于
Fix `bin/rails db:migrate` with specified `VERSION`
-
由 George Claghorn 提交于
Closes #31073.
-
由 Ryuta Kamizono 提交于
`associated_records_by_owner` had returned customizing result before calling `associate_records_to_owner` for through association subclasses. Since #22115, `associate_records_to_owner` is called in the method and not returned owner and result pairs. Removing the method will reduce method call and block call nesting.
-
由 Rafael França 提交于
Execute `ConfirmationValidator` validation when `_confirmation`'s value is `false`
-
由 bogdanvlviv 提交于
- Test condition that is defined by array of conditions - Test condition that is defined by combining :if and :unless - Test local condition that is defined by :if - Test local condition that is defined by :unless See http://edgeguides.rubyonrails.org/active_record_validations.html#combining-validation-conditions
-
由 bogdanvlviv 提交于
Ensure that `bin/rails db:migrate` with specified `VERSION` reverts all migrations only if `VERSION` is `0`. Raise error if target migration doesn't exist.
-
由 Ryuta Kamizono 提交于
-
由 Rafael França 提交于
Provide initialization of Active Storage
-
由 Rafael Mendonça França 提交于
Make `assert_recognizes` to traverse mounted engines
-
由 Matthew Draper 提交于
Handle Timeout.timeout in rails queries
-
由 Rafael França 提交于
Refactored preloading of a though assocations
-
由 bogdanvlviv 提交于
-
由 bogdanvlviv 提交于
-
由 bogdanvlviv 提交于
Omit `rails activestorage:install` for jdbcmysql, jdbc and shebang tests AppGeneratorTest#test_config_jdbcmysql_database rails aborted! LoadError: Could not load 'active_record/connection_adapters/mysql_adapter'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile. (compressed) bin/rails:4:in `<main>' Tasks: TOP => activestorage:install => environment (See full trace by running task with --trace) AppGeneratorTest#test_config_jdbc_database rails aborted! LoadError: Could not load 'active_record/connection_adapters/jdbc_adapter'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile. (compressed) bin/rails:4:in `<main>' Tasks: TOP => activestorage:install => environment (See full trace by running task with --trace) AppGeneratorTest#test_shebang_is_added_to_rails_file /home/ubuntu/.rbenv/versions/2.4.1/bin/ruby: no Ruby script found in input (LoadError) Prevent PendingMigrationError in tests * Run `bin/rails db:migrate RAILS_ENV=test` in test_cases before start tests to prevent PendingMigrationError * FileUtils.rm_r("db/migrate") * --skip-active-storage Fix failed tests in `railties/test/railties/engine_test.rb` Related to #30111 Imporve `SharedGeneratorTests#test_default_frameworks_are_required_when_others_are_removed` - Explicitly skip active_storage - Ensure that skipped frameworks are commented - Ensure that default frameworks are not commented Fix error `Errno::ENOSPC: No space left on device - sendfile` Since `rails new` runs `rails active_storage:install` that boots an app. Since adding Bootsnap 0312a5c6 during booting an app, it creates the cache: 264K tmp/cache/bootsnap-load-path-cache 27M tmp/cache/bootsnap-compile-cache * teardown_app must remove app
-
由 bogdanvlviv 提交于
Closes #30102 Revert part 787fe90d --skip-active-storage pass throughs `rails plugin new` Add changelog entry about default initialization of Active Storage
-
由 Keenan Brock 提交于
``` [NoMethodError]: undefined method `state' for nil:NilClass Method:[rescue in block in refresh] ``` In `within_new_transaction`, there is the possibility that `begin_transaction` returns a `nil`. (i.e.: so `transaction = nil`) So this method is checking `transaction` for nil in 2 spots. Unfortunately, there is one line that is not checking `transaction` for `nil` That line, `commit_transaction`, throws an exception for us in AR 5.0.0.1 The problem with the method is finally realized in the error checking itself. it calls `transaction.state` (i.e.: nil.state) and that is the final exception raised. The actual underlying (user) issue is hidden by this line. Solution is test transaction for nil.
-
由 Rafael França 提交于
Resolve Minitest 6 deprecation in assert_no_changes
-
由 Dan Ott 提交于
These changes resolve a deprecation warning in `assert_no_changes` when asserting that an expression evaluates to `nil` before and after the passed block is evaluated. The smallest demonstration of this edge case: ```ruby assert_no_changes "nil" do true # noop end ``` Under the covers, this is evaluating ```ruby assert_equal nil, nil ``` Minitest 5 issues a deprecation warning, and Minitest will fail completely. For additional context, the motivations and implications of this change to Minitest have been discussed at length in [seattlerb/minitest#666][]. [seattlerb/minitest#666]: https://github.com/seattlerb/minitest/issues/666
-
- 06 11月, 2017 15 次提交
-
-
由 Bogdan Gusiev 提交于
-
由 Andrew White 提交于
Acronym inflections are stored with lowercase keys in the hash but the match wasn't being lowercased before being looked up in the hash. This shouldn't have any performance impact because before it would fail to find the acronym and perform the `downcase` operation anyway. Fixes #31052.
-
由 Andrew White 提交于
Fix french spelling mistake
-
由 Andrew White 提交于
Mirror the API of Ruby stdlib for #prev_day, #next_day, #prev_month, #next_month, #prev_year, #next_year
-
由 Skander 提交于
Trés -> Très https://fr.wiktionary.org/wiki/tr%C3%A8s
-
由 Ryuta Kamizono 提交于
Remove unused require
-
由 yuuji.yaginuma 提交于
Since f1828319, this file does not use methods added by `module/introspection`.
-
由 Rafael França 提交于
Explicitly pass window handle to `resize_window_to`
-
由 yuuji.yaginuma 提交于
Unlike `resize_window`, `resize_window_to` has three arguments. https://github.com/thoughtbot/capybara-webkit/blob/d63c3c8e3ae844f0c59359532a6dcb50f4a64d0a/lib/capybara/webkit/driver.rb#L135-L143 Therefore, if pass only width and height just like `resize_window`, `ArgumentError`will be raised. To prevent this, explicitly pass window handler. Follow up of #31046
-
由 Ryuta Kamizono 提交于
A relation includes `klass`, so it can not be used as it is if current class is different from `current_scope.klass`. It should be created new relation by current class to respect the klass and STI constraint. Fixes #17603. Fixes #23576.
-
由 Ryuta Kamizono 提交于
This is partially fixed by e617fb57 when through association has already loaded. Otherwise, second level through association should respect `preload_scope`. Fixes #30242. Closes #30076. [Ryuta Kamizono & CicholGricenchos]
-
由 Ryuta Kamizono 提交于
If through association has already loaded, `source_type` is ignored to loaded through records. The loaded records should be filtered by `source_type` in that case. Fixes #30904.
-
由 bogdanvlviv 提交于
-
由 Ryuta Kamizono 提交于
If a relation has eager-loading values, `count` and `exists?` works properly, but `update_all` and `delete_all` doesn't work due to missing `apply_join_dependency`. It should be applied to work consistently. Fixes #28863.
-
由 Ryuta Kamizono 提交于
Fixes #30315.
-
- 05 11月, 2017 5 次提交
-
-
由 Eileen M. Uchitelle 提交于
Generate the correct path in nested scaffold generator
-
由 Ryuta Kamizono 提交于
Show `RequestForgeryProtection` methods in api doc [ci skip]
-
由 yuuji.yaginuma 提交于
Several methods of `RequestForgeryProtection` are not showed in the api doc even though `:doc:` is specified. (e.g. `form_authenticity_param`) http://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html These methods are listed in the doc of v4.1. http://api.rubyonrails.org/v4.1/classes/ActionController/RequestForgeryProtection.html This is due to the influence of `:nodoc:` added in #18102, methods after `CROSS_ORIGIN_JAVASCRIPT_WARNING` not showed from the doc. Therefore, in order to show the method like originally, added `startdoc` after `CROSS_ORIGIN_JAVASCRIPT_WARNING`.
-
由 yuuji.yaginuma 提交于
Currently, namespaced scaffold generator will generate an incorrect path and the generated file will not work properly. ``` $ ./bin/rails g scaffold admin/user $ ./bin/rails db:migrate $ ./bin/rails t test/controllers # Running: E Error: Admin::UsersControllerTest#test_should_create_admin_user: NameError: undefined local variable or method `admin_admin_users_url' for #<Admin::UsersControllerTest:0x000055a59f25ff68> Did you mean? admin_users test/controllers/admin/users_controller_test.rb:20:in `block (2 levels) in <class:UsersControllerTest>' test/controllers/admin/users_controller_test.rb:19:in `block in <class:UsersControllerTest>' bin/rails test test/controllers/admin/users_controller_test.rb:18 ``` This is because combine `controller_class_path` and `singular_table_name` to generate route. https://github.com/rails/rails/blob/360698aa245b45349d1d1b12e1afb34759515e69/railties/lib/rails/generators/named_base.rb#L172 Normally, if using namspaced generator, table name already contains namespace. Therefore, adding `controller_class_path` adds extra namespace. Since it is special only when explicitly specifying `model-name`, it is modified to change the value only when `model-name`is specified. Follow up of #30729
-
由 Eileen M. Uchitelle 提交于
Fix Capybara::Webkit::Driver#resize_window deprecation warning
-