- 13 2月, 2015 5 次提交
-
-
由 Ryuta Kamizono 提交于
The datetime precision tests for any adapters is duplicated.
-
由 Zachary Scott 提交于
Add tip for skipping `partial` and `locals` options for `render`
-
由 Rafael Mendonça França 提交于
ActionController#translate supports symbols
-
由 Rafael Mendonça França 提交于
Allow `:precision` option for time type columns
-
由 Rafael Mendonça França 提交于
remove unnecessary assignment/parameter passing in AS::Callbacks...::Around (master branch)
-
- 12 2月, 2015 20 次提交
-
-
由 Yves Senn 提交于
This finally removes the warning "WARNING: there is no transaction in progress" when running Active Record tests using PostgreSQL.
-
由 Yves Senn 提交于
Also removed some cruft in the `setup` and `teardown` methods.
-
由 Yves Senn 提交于
"active_support/testing/stream" is already required in `test_case.rb`. Furthermore the test "test/cases/migration_test.rb" could no longer be executed directly.
-
由 Kasper Timm Hansen 提交于
fix typo in fresh_when example [ci skip]
-
由 yuuji.yaginuma 提交于
-
由 Yves Senn 提交于
Schema creation doesn't load the app
-
由 Godfrey Chan 提交于
`coder.represent_scalar` means something along the lines of "Here is a quoted string, you can just add it to the output", which is not the case here. It only works for simple strings that can appear unquoted in YAML, but causes problems for e.g. primitive-like strings ("1", "true"). `coder.represent_object` on the other hand, means that "This is the Ruby-object representation for this thing suitable for use in YAML dumping", which is what we want here. Before: YAML.load ActiveSupport::SafeBuffer.new("Hello").to_yaml # => "Hello" YAML.load ActiveSupport::SafeBuffer.new("true").to_yaml # => true YAML.load ActiveSupport::SafeBuffer.new("false").to_yaml # => false YAML.load ActiveSupport::SafeBuffer.new("1").to_yaml # => 1 YAML.load ActiveSupport::SafeBuffer.new("1.1").to_yaml # => 1.1 After: YAML.load ActiveSupport::SafeBuffer.new("Hello").to_yaml # => "Hello" YAML.load ActiveSupport::SafeBuffer.new("true").to_yaml # => "true" YAML.load ActiveSupport::SafeBuffer.new("false").to_yaml # => "false" YAML.load ActiveSupport::SafeBuffer.new("1").to_yaml # => "1" YAML.load ActiveSupport::SafeBuffer.new("1.1").to_yaml # => "1.1" If we ever want Ruby to behave more like PHP or JavaScript though, this is an excellent trick to use ;)
-
由 Ryuta Kamizono 提交于
-
由 Tamir Duberstein 提交于
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
In addition to cleaning up the implementation, this allows type casting behavior to be applied consistently everywhere. (#where for example). A good example of this was the previous need for handling value to key conversion in the setter, because the number had to be passed to `where` directly. This is no longer required, since we can just pass the string along to where. (It's left around for backwards compat) Fixes #18387
-
由 Sean Griffin 提交于
It looks like the only reason `current_scope` was thread local on `base_class` instead of `self` is to ensure that when we call a named scope created with a proc on the parent class, it correctly uses the default scope of the subclass. The reason this wasn't happening was because the proc captured `self` as the parent class, and we're not actually defining a real method. Using `instance_exec` fixes the problem. Fixes #18806
-
由 Rafael Mendonça França 提交于
Refactor `quote_default_expression`
-
由 Rafael Mendonça França 提交于
Fixes incorrect wording of test description
-
由 Rafael Mendonça França 提交于
Accept a collection in fresh_when and stale?
-
由 Rafael Mendonça França 提交于
Remove some code duplication in ActionView tags code
-
由 Rafael Mendonça França 提交于
This caused a performance regression since we were decided to do the nil check in run time not in the load time. See https://github.com/rails/rails/pull/15187#issuecomment-71760058
-
由 Adam Doeler 提交于
-
由 Sean Griffin 提交于
As far as I can tell, the original reason that this behavior was added has been sufficiently resolved elsewhere, as we no longer remove the encoding of strings coming out of the database.
-
由 eileencodes 提交于
Freezing the string literal reduces the number of objects allocated during integration test runs. AllocationTracer before: ``` [["/rack/lib/rack/utils.rb", 499, :T_STRING], [50939, 2737, 78553, 0, 13, 1783920]] [["/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [44959, 0, 42633, 0, 2, 1670800]] [["/rack/lib/rack/utils.rb", 662, :T_STRING], [32979, 0, 31263, 0, 1, 1226009]] [["/rack/lib/rack/body_proxy.rb", 34, :T_ARRAY], [29988, 0, 28438, 0, 1, 1114320]] [["/rails/activesupport/lib/active_support/callbacks.rb", 165, :T_DATA], [29968, 0, 28422, 0, 2, 3675936]] ``` AllocationTracer after: ``` [["/rack/lib/rack/utils.rb", 499, :T_STRING], [50983, 4080, 67269, 0, 12, 1815600]] [["/rack/lib/rack/utils.rb", 662, :T_STRING], [33001, 0, 28420, 0, 2, 1230809]] [["/rack/lib/rack/body_proxy.rb", 34, :T_ARRAY], [29990, 0, 25812, 0, 1, 1118000]] [["/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [29986, 0, 25803, 0, 1, 1117840]] [["/rails/activesupport/lib/active_support/notifications/instrumenter.rb", 52, :T_HASH], [29984, 28, 26133, 0, 11, 4953280]]
-
- 11 2月, 2015 15 次提交
-
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
The latest version of the PG gem can actually convert the primitives for us in C code, which gives a pretty substantial speed up. A few cases were only there to add the `infinity` method, which I just put on the range type (which is the only place it was used). Floats also needed to parse `Infinity` and `NaN`, but it felt reasonable enough to put that on the generic form.
-
由 Sean Griffin 提交于
The datetime precision with zero should be dumped
-
由 Bogdan Gusiev 提交于
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
MySQL rejects to remove an index which is used in a foreign key constraint: ``` ActiveRecord::StatementInvalid: Mysql2::Error: Cannot drop index 'index_copies_on_title_id': needed in a foreign key constraint: ALTER TABLE `copies` DROP `title_id` ``` Removing the constraint before removing the column (and the index) solves this problem.
-
由 Yves Senn 提交于
Remove `cast_type` in `ColumnDefinition`
-
由 Yves Senn 提交于
/cc @zzak
-
由 Yves Senn 提交于
Adding subsection on 'Upgrading' guide about foreign key support [ci skip]
-
由 Zachary Scott 提交于
Fix some typos in railties/lib/rails/engine.rb [ci-skip]
-
由 RobertZK 提交于
-
由 Arthur Nogueira Neves 提交于
Fix typo in Rails::Application#migration_railties documentation [ci-skip]
-
由 RobertZK 提交于
-
由 Rafael Mendonça França 提交于
Use keyword argument in `transaction`
-