- 16 11月, 2016 8 次提交
-
-
由 Koichi ITO 提交于
-
由 Yves Senn 提交于
The relation method `update_all` allows you to pass a SQL fragment. The functionality is already mentioned in the prose but the examples section does not cover it.
-
由 Guillermo Iguaran 提交于
Fix testing isolation
-
由 Jon Moss 提交于
Support AC::Parameters for PG HStore
-
由 Jon Moss 提交于
As reported via #26904, there is a regression in how values for Postgres' HStore column type are being processed, beginning in Rails 5. Currently, the way that Active Record checks whether or not values need to be serialized and put into the correct storage format is whether or not it is a `Hash` object. Since `ActionController::Parameters` no longer inherits from `Hash` in Rails 5, this conditional now returns false. To remedy this, we are now checking to see whether the `value` parameters being passed in responds to a certain method, and then calling the `serialize` method, except this time with a real Hash object. Keeping things DRY! Fixes #26904.
-
由 Kir Shatrov 提交于
AS::Testing::Isolation has two ways to isolate the process: forking and subprocessing. The second way is used on JRuby and other platforms that don't support forking. The way how subprocessing works is that we prepare a command to run a new process: ``` /opt/rubies/2.3.0/bin/ruby -I{skipped_load_path} test/initializable_test.rb '' -nInitializableTests::Basic#test_Initializer_provides_context's_class_name ``` As you see, there's unescaped quote at the end of the line. It leads to: ``` sh: -c: line 0: unexpected EOF while looking for matching `'' sh: -c: line 1: syntax error: unexpected end of file ``` This fixes tests on MRI + NO_FORK variable and on JRuby
🎉 -
由 Sean Griffin 提交于
Refactor `NullRelation#calculate`
-
由 Ryuta Kamizono 提交于
Before: ```ruby def calculate(operation, _column_name) if [:count, :sum].include? operation group_values.any? ? Hash.new : 0 elsif [:average, :minimum, :maximum].include?(operation) && group_values.any? Hash.new else nil end end ``` After: ```ruby def calculate(operation, _column_name) case operation when :count, :sum group_values.any? ? Hash.new : 0 when :average, :minimum, :maximum group_values.any? ? Hash.new : nil end end ```
-
- 15 11月, 2016 12 次提交
-
-
由 Akira Matsuda 提交于
Without this, bundler tries to bundle json 1.8 on Ruby 2.4 in some cases https://travis-ci.org/rails/rails/jobs/175874852
-
由 प्रथमेश Sonpatki 提交于
remove `alias_method_chain` from guide [ci skip]
-
由 yuuji.yaginuma 提交于
Follow up to 7c848e6d
-
由 Rafael França 提交于
remove duplicated changelog entry [ci skip]
-
由 yuuji.yaginuma 提交于
-
由 Jon Moss 提交于
Fix small typo in Layouts and Rendering guide.
-
由 Conrad Beach 提交于
Changed "same way they do" to "same way they are".
-
由 Akira Matsuda 提交于
-
由 Andrew White 提交于
Remove Active Support deprecations
-
由 Rafael França 提交于
Add `:skip_sprockets` to `Rails::PluginBuilder::PASSTHROUGH_OPTIONS`
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
This reverts commit bad3a120, reversing changes made to 23843174. Reason: Adding a new option in the API for something that can be done with a `#presence` check could do.
-
- 14 11月, 2016 20 次提交
-
-
由 Andrew White 提交于
-
由 Andrew White 提交于
-
由 Andrew White 提交于
-
由 Andrew White 提交于
-
由 Tsukuru Tanimichi 提交于
`rails plugin new` with `--full` and `--skip-sprockets` options generates a dummy application that throws `NoMethodError`. ``` % rails plugin new my_engine -S --full --skip-gemspec % cd my_engine % bin/rails test rails aborted! NoMethodError: undefined method `assets' for #<Rails::Application::Configuration:0x007f83aa1e6100> ```
-
由 Andrew White 提交于
-
由 Andrew White 提交于
-
由 Rafael Mendonça França 提交于
Don't error on an empty CONTENT_TYPE
-
由 Rafael França 提交于
Format and send logs to logger.fatal from DebugExceptions
-
由 Rafael França 提交于
Avoid `build_preloader` if preloading is not needed
-
由 Matthew Draper 提交于
Call `spawn` and bang method for `none`
-
由 Ryuta Kamizono 提交于
All query methods calls `spawn` and bang method, but only `none` is not.
-
由 Rafael França 提交于
Fix NameError: undefined local variable or method `result`
-
由 Ryuta Kamizono 提交于
Caused by 007e50d8. https://github.com/rails/rails/pull/26925 was closed in favor of dcb364ec. But dcb364ec is only fixed sqlite3 adapter and still broken mysql2 adapter with `prepared_statements: true` (`exec_stmt_and_free`). ```diff diff --git a/activerecord/test/config.example.yml b/activerecord/test/config.example.yml index 58e2d45..7b3c1a6 100644 --- a/activerecord/test/config.example.yml +++ b/activerecord/test/config.example.yml @@ -56,9 +56,11 @@ connections: username: rails encoding: utf8 collation: utf8_unicode_ci + prepared_statements: true arunit2: username: rails encoding: utf8 + prepared_statements: true oracle: arunit: ``` ``` % be rake test_mysql2 --verbose ... Using mysql2 /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb:90: warning: assigned but unused variable - result /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb:101:in `block in exec_stmt_and_free': NameError: undefined local variable or method `result' for #<ActiveRecord::ConnectionAdapters::Mysql2Adapter:0x007fe2c50eb140>: SELECT `ar_internal_metadata`.* FROM `ar_internal_metadata` WHERE `ar_internal_metadata`.`key` = ? LIMIT ? (ActiveRecord::StatementInvalid) from /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:586:in `block in log' ... ```
-
由 Rafael França 提交于
Remove warning from Bignum constant access
-
由 Rafael França 提交于
use correct value in example [ci skip]
-
由 yuuji.yaginuma 提交于
Need to specify `reload` from turbolinks 5. Ref: 7225f0bb
-
由 Andrew White 提交于
-
由 Andrew White 提交于
-
由 Andrew White 提交于
-