- 20 12月, 2014 5 次提交
-
-
由 Arthur Nogueira Neves 提交于
Add nodoc to some constants [skip ci]
-
由 Godfrey Chan 提交于
Allow static asset serving from env variable (enhanced!) Conflicts: railties/CHANGELOG.md
-
由 Xavier Noria 提交于
-
由 Rafael Mendonça França 提交于
-
由 Carlos Antonio da Silva 提交于
-
- 19 12月, 2014 8 次提交
-
-
由 Yves Senn 提交于
`db:schema:load` and `db:structure:load` do not purge the database
-
由 Yves Senn 提交于
-
由 Godfrey Chan 提交于
`rack.version` was bumped in https://github.com/rack/rack/commit/28e77c710ac2ddb35c436d78d72e28f28f964446
-
由 Godfrey Chan 提交于
This reverts commit da5cc10e. Fixes #18091 See also https://github.com/rails/rails/pull/18003#commitcomment-9030909
-
由 Zachary Scott 提交于
/cc @senny Is this change documented somewhere?
-
由 Rafael Mendonça França 提交于
And also bundler cache
-
由 Rafael Mendonça França 提交于
Add docs for AS::TestCase::test_order
-
由 claudiob 提交于
Document `test_order` and `test_order=` from `ActiveSupport::TestCase`. [ci skip]
-
- 18 12月, 2014 15 次提交
-
-
由 Eileen M. Uchitelle 提交于
Spelling fix [ci skip]
-
由 George Millo 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
/cc @matthewd
-
由 Yves Senn 提交于
Closes #17945 `db:test:prepare` still purges the database to always keep the test database in a consistent state. This patch introduces new problems with `db:schema:load`. Prior to the introduction of foreign-keys, we could run this file against a non-empty database. Since every `create_table` containted the `force: true` option, this would recreate tables when loading the schema. However with foreign-keys in place, `force: true` wont work anymore and the task will crash. /cc @schneems
-
由 Godfrey Chan 提交于
Apparently PG does not validate against RFC 4122. The intent of the original patch is just to protect against PG errors (which potentially breaks txns, etc) because of bad user input, so we shouldn't try any harder than PG itself. Closes #17931
-
由 Abdelkader Boudih 提交于
[ci skip] Fix HTML format on comment
-
由 yui-knk 提交于
-
由 Zachary Scott 提交于
-
由 Zachary Scott 提交于
Fix name on changelog [ci skip]
-
由 Andrey Nering 提交于
-
由 Rafael Mendonça França 提交于
Replace AS::TimeWithZone#since with alias to +
-
由 Rafael Mendonça França 提交于
Use thread_safe gem version greater or equal to 0.3.4
-
由 Xavier Noria 提交于
The previous example was a little convoluted and the exposition claifying the parts that were correct albeit not totally obvious were interferring in my view. This example has less things going on and gets to the key problem with less balls in the air.
-
由 Evgeny Li 提交于
-
- 17 12月, 2014 12 次提交
-
-
由 Carlos Antonio da Silva 提交于
Remove unused line
-
由 Rafael Mendonça França 提交于
[ci skip] Change three backticks to just one
-
由 yui-knk 提交于
-
由 Ryuta Kamizono 提交于
-
由 Xavier Noria 提交于
fix link in autoloading guide [ci skip]
-
由 yuuji.yaginuma 提交于
-
由 claudiob 提交于
Stems from [Google group discussion](https://groups.google.com/forum/#!topic/rubyonrails-core/jSPbP-TNLb0). Currently `AS::TimeWithZone` has two methods to add an interval to a time: `+(other)` and `since(other)` ([docs](http://edgeapi.rubyonrails.org/classes/ActiveSupport/TimeWithZone.html)). The two methods are "pretty much" equivalent in every case: 1. When adding any interval to an `AS::TimeWithZone` representing a `Time`: ```ruby t = Time.now.in_time_zone #=> Thu, 04 Dec 2014 18:56:28 EST -05:00 t + 1 == t.since(1) #=> true t + 1.day == t.since(1.day) #=> true t + 1.month == t.since(1.month) #=> true ``` 2. When adding any interval to an `AS::TimeWithZone` representing a `Date`: ```ruby d = Date.today.in_time_zone #=> Thu, 04 Dec 2014 00:00:00 EST -05:00 d + 1 == d.since(1) #=> true d + 1.day == d.since(1.day) #=> true d + 1.month == d.since(1.month) #=> true ``` 3. When adding any interval to an `AS::TimeWithZone` representing a `DateTime`: ```ruby dt = DateTime.now.in_time_zone #=> Thu, 04 Dec 2014 18:57:28 EST -05:00 dt + 1 == dt.since(1) #=> true dt + 1.day == dt.since(1.day) #=> true dt + 1.month == dt.since(1.month) #=> false ``` As you can see, the only case in which they differ is when the interval added to a `DateTime` is in a format like `1.month`. However, this usage of "since" is explicitly discouraged by the [documentation of `DateTime#since`](https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/date_time/calculations.rb#L86L88): > Returns a new DateTime representing the time a number of seconds since the instance time. > Do not use this method in combination with x.months, use months_since instead! And indeed, following this recommendation the correct result is returned: ```ruby dt + 1.month == dt.months_since 1 #=> true ``` Therefore, my proposal is to remove the method definition of `TimeWithZone#since` and instead replace it with a simple `alias_method :since, :+`. The rationale is that the only case where they differ is a case that is explicitly discouraged as "wrong". In my opinion, having two methods named `since` and `+` and having to figure out exactly what the difference is makes the codebase more confusing. However, I understand this PR is "subjective", so if you feel like it's better to ignore this, feel free to close the PR. Thanks!
-
由 Sean Griffin 提交于
In the case of serialized columns, we would expect the unserialized value as input, not the serialized value. The original issue which made this distinction, #14163, introduced a bug. If you passed serialized input to the method, it would double serialize when it was sent to the database. You would see the wrong input upon reloading, or get an error if you had a specific type on the serialized column. To put it another way, `update_column` is a special case of `update_all`, which would take `['a']` and not `['a'].to_yaml`, but you would not pass data from `params` to it. Fixes #18037
-
由 Rafael Mendonça França 提交于
Add class level case operator support for error dispatching in Rescuable
-
由 Rafael Mendonça França 提交于
Improving Method Chaining section [ci skip]
-
由 Andrey Nering 提交于
-
由 Rafael Mendonça França 提交于
assert template should raise ArgumentError for unsupported layout types
-