- 22 2月, 2016 2 次提交
-
-
由 Ian Fleeton 提交于
-
由 Vipul A M 提交于
Show correct return types for examples
-
- 21 2月, 2016 14 次提交
-
-
由 Kasper Timm Hansen 提交于
Why are we here? Where did we come from? Where are we going... in 5 minutes? These questions are not answered in this documentation. Instead collection caching is better clarified. How it works, how it can share caches with individual templates.
-
由 Kasper Timm Hansen 提交于
Yo dawg, we so explicit if we were a music track, yo' iPhone's Music app would put an E next to it. *drops mic*
-
由 Kasper Timm Hansen 提交于
Get it? ( ͡° ͜ʖ ͡°)
-
由 Kasper Timm Hansen 提交于
use method provided by minitest
-
由 प्रथमेश Sonpatki 提交于
Fixed typo
-
由 Chashmeet Singh 提交于
-
由 yuuji.yaginuma 提交于
The process of converting `Test` to `String` is already defined in minitest. I think it is better to use that for the consistency of output content. ref: https://github.com/seattlerb/minitest/blob/master/lib/minitest/test.rb#L261..L267
-
由 Rafael França 提交于
Improve CHANGELOG for https://github.com/rails/rails/pull/17043 [ci skip]
-
由 Matthew Draper 提交于
Mutating the result of Relation#to_a should not affect the relation
-
由 Kasper Timm Hansen 提交于
Make collection caching explicit.
-
由 David Heinemeier Hansson 提交于
-
由 Kasper Timm Hansen 提交于
Augments the collection caching with some instrumentation that's logged. For collections that have been cached like: ```ruby <%= render partial: 'notifications/notification', collection: @notifications, cached: true %> ``` We'll output a line showing how many cache hits we had when rendering it: ``` Rendered collection of notifications/_notification.html.erb [0 / 100 cache hits] (3396.5ms) ```
-
由 Matthew Draper 提交于
Clarifying this separation and enforcing relation immutability is the culmination of the previous efforts to remove the mutator method delegations.
-
由 Kasper Timm Hansen 提交于
Reevaluating the log output generated from this instrumentation, we've found that it wasn't all that useful in practice. ``` Caches multi read: - views/david/2/4184ab71db6849621a4d8820fcd2c0ad - views/david/2/4184ab71db6849621a4d8820fcd2c0ad - views/david/3/4184ab71db6849621a4d8820fcd2c0ad - views/david/3/4184ab71db6849621a4d8820fcd2c0ad ``` If rendering many templates the output is inscrutable, and it's impossible to see how many cache misses there were. Revert ca6aba7f and implement a better way later.
-
- 20 2月, 2016 15 次提交
-
-
由 Kasper Timm Hansen 提交于
Having collection caching that wraps templates and automatically tries to infer if they are cachable proved to be too much of a hassle. We'd rather have it be something you explicitly turn on. This removes much of the code and docs to explain the previous automatic behavior. This change also removes scoped cache keys and passing cache_options.
-
由 Eileen M. Uchitelle 提交于
fix typo
-
由 eileencodes 提交于
Fixes #23645 When you're using an `attr_accessor` for a record instead of an attribute in the database there's no way for the record to know if it has `changed?` unless you tell it `attribute_will_change!("attribute")`. The change made in 27aa4dda updated validations to check if a record was `changed?` or `marked_for_destruction?` or not `persisted?`. It did not take into account virtual attributes that do not affect the model's dirty status. The only way to fix this is to always validate the record if the attribute does not belong to the set of attributes the record expects (in `record.attributes`) because virtual attributes will not be in that hash. I think we should consider deprecating this particular behavior in the future and requiring that the user mark the record dirty by noting that the virtual attribute will change. Unfortunately this isn't easy because we have no way of knowing that you did the "right thing" in your application by marking it dirty and will get the deprecation warning even if you are doing the correct thing. For now this restores expected behavior when using a virtual attribute by always validating the record, as well as adds tests for this case. I was going to add the `!record.attributes.include?(attribute)` to the `should_validate?` method but `uniqueness` cannot validate a virtual attribute with nothing to hold on to the attribute. Because of this `should_validate?` was about to become a very messy method so I decided to split them up so we can handle it specifically for each case.
-
由 Lobsiinvok 提交于
-
-
由 प्रथमेश Sonpatki 提交于
Fixed a typo
-
由 Gautam Sawhney 提交于
-
由 Gert Goet 提交于
-
由 Aaron Patterson 提交于
habtm join tables commonly have two id columns and it's OK to make those two id columns a primary key. This commit eliminates the warnings for join tables that have this setup. ManageIQ/manageiq#6713
-
由 Rafael França 提交于
Deprecate AC::Parameters#== with Hash
-
由 Rafael França 提交于
Add methods back to array delegation from ActiveRecord::Relation
-
由 Rafael França 提交于
Fix button_to's params option to support nested names.
-
由 Kevin Dougherty 提交于
Delegation of some `Array` methods was removed in commit 9d79334a. That change did add explicit delegation of a few methods that `Array` has but which aren't on `Enumerable`. However, a few non-mutation methods were omitted. This adds `Array` delegation of `#in_groups`, `#in_groups_of`, `#shuffle` and `#split`. This allows things like `MyThing.all.in_groups_of(3) { ... }` to continue working as they did before commit 9d79334a.
-
由 Rafael França 提交于
Dependencies clean up
-
由 James Coleman 提交于
In e6e0579d the `params` option was added to the `button_to` helper. However, the patch doesn't support nested hashes so `{a: {b: 'c'}}` for example gets turned into a hidden form input with the name 'a' and the value being the string representation of the `{b: 'c'}` nested hash. Since Rails supports nested hashes everywhere else (and even in the URL params of link_to and button_to), I believe this to be a bug/unfinished feature.
-
- 19 2月, 2016 9 次提交
-
-
由 David Heinemeier Hansson 提交于
Make ActionCable logging less verbose in development
-
由 Sruli Rapps 提交于
Cleans up four items I came across in ActiveSupport::Dependencies: - DependenciesTest# test_dependency_which_raises_exception_isnt_added_to_loaded_set: Fixes current implementation which will pass no matter what since the filepath is never added to "loaded" or "history" without being expanded first. - Remove DependenciesTest#test_unhook. Seems leftover from when alias_method_chain was used in Loadable and ModuleConstMissing. The test will always pass since Module never responds to those methods - WatchStack#new_constants documentation: update self to @stack. Looks like self was leftover from when WatchStack inherited from Hash - Remove ActiveSupport namespace from call to Dependencies.constant_watch_stack.watching? since the namespace is not needed, Dependencies is called two other times in the same method without it (even on the same line) and it brings the line to within 80 characters
-
由 Benjamin Quorning 提交于
-
由 Benjamin Quorning 提交于
Creating a protected getter method for `@parameters`.
-
由 Benjamin Quorning 提交于
-
由 Rafael França 提交于
Merge pull request #23773 from wisetara/wisetara/update-docs-ActiveSupport__TestCase#assert_nothing_raised-for-pr better docs for ActiveSupport::TestCase#assert_nothing_raised
-
-
由 Jon Moss 提交于
remove needless `debug_exception_response_format` config [ci skip]
-
由 yuuji.yaginuma 提交于
Since a0343d11, `debug_exception_response_format` config depends on `api_only`. Therefore, if set the `api_only`, need to specify `debug_exception_response_format` is not.
-