- 01 9月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
Don't use remove_method or remove_possible_method just before a new definition: at best the purpose is unclear, and at worst it creates a race condition. Instead, prefer redefine_method when practical, and silence_redefinition_of_method otherwise.
-
- 20 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 02 7月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
This reverts commit 3420a145, reversing changes made to afb66a5a.
-
- 01 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 30 5月, 2017 1 次提交
-
-
由 David Heinemeier Hansson 提交于
* Allow a default value to be declared for class_attribute * Convert to using class_attribute default rather than explicit setter * Removed instance_accessor option by mistake * False is a valid default value * Documentation
-
- 23 5月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 05 1月, 2017 1 次提交
-
-
由 Akira Matsuda 提交于
Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
-
- 14 9月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
All indentation was normalized by rubocop auto-correct at 80e66cc4. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency.
-
- 06 9月, 2016 1 次提交
-
-
由 Alex Kitchens 提交于
Recently, the Rails team made an effort to keep the source code consistent, using Ruboco (bb1ecdcc and below). Some of the case statements were missed. This changes the case statements' formatting and is consistent with changes in 810dff7c and db63406c.
-
- 03 9月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
All indentation was normalized by rubocop auto-correct at 80e66cc4. But heredocs was still kept absolute position. This commit aligns heredocs indentation for consistency.
-
- 16 8月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
-
- 08 8月, 2016 1 次提交
-
-
由 Xavier Noria 提交于
A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required.
-
- 07 8月, 2016 4 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
-
- 24 2月, 2016 1 次提交
-
-
由 yui-knk 提交于
-
- 23 2月, 2016 1 次提交
-
-
由 yui-knk 提交于
As shown below, we should use <tt>...</tt> for string literal ``` $ echo "+'id'+" | rdoc --pipe <p>+'id'+</p> $ echo "<tt>'id'</tt>" | rdoc --pipe <p><code>'id'</code></p> ```
-
- 23 1月, 2016 1 次提交
-
-
由 Andrew White 提交于
When updating an associated record via nested attribute hashes the reject_if proc could be bypassed if the _destroy flag was set in the attribute hash and allow_destroy was set to false. The fix is to only short-circuit if the _destroy flag is set and the option allow_destroy is set to true. It also fixes an issue where a new record wasn't created if _destroy was set and the option allow_destroy was set to false. CVE-2015-7577
-
- 21 7月, 2015 1 次提交
-
-
由 Sameer Rahmani 提交于
ActiveRecord::RecordNotFound modified to store model name, primary_key and id of the caller model. It allows the catcher of this exception to make a better decision to what to do with it. For example consider this simple example: class SomeAbstractController < ActionController::Base rescue_from ActiveRecord::RecordNotFound, with: :redirect_to_404 private def redirect_to_404(e) return redirect_to(posts_url) if e.model == 'Post' raise end end
-
- 18 7月, 2015 2 次提交
-
-
由 Thomas Walpole 提交于
-
由 Sean Griffin 提交于
Since nested hashes are also instances of `ActionController::Parameters`, and we're explicitly looking to work with a hash for nested attributes, this caused breakage in several points. This is the minimum viable fix for the issue (and one that I'm not terribly fond of). I can't think of a better place to handle this at the moment. I'd prefer to use some sort of solution that doesn't special case AC::Parameters, but we can't use something like `to_h` or `to_a` since `Enumerable` adds both. While I've added a trivial test case for verifying this fix in isolation, we really need better integration coverage to prevent regressions like this in the future. We don't actually have a lot of great places for integration coverage at the moment, so I'm deferring it for now. Fixes #20922.
-
- 22 5月, 2015 1 次提交
-
-
由 Waynn Lue 提交于
-
- 18 5月, 2015 1 次提交
-
-
由 sh6khan 提交于
skip]
-
- 28 4月, 2015 1 次提交
-
-
由 Benny Klotz 提交于
-
- 18 2月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
-
- 30 1月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
Collection associations would have already been validated, but singular associations were not. Fixes #18735.
-
- 29 1月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
These callbacks will already have been defined when the association was built. The check against `reflection.autosave` happens at call time, not at define time, so simply modifying the reflection is sufficient. Fixes #18704
-
- 03 1月, 2015 1 次提交
-
-
由 Robin Dupret 提交于
-
- 23 12月, 2014 1 次提交
-
-
由 George Millo 提交于
I just wasted an absurd amount of time trying to figure out why my model wasn't being deleted even though I was setting `_destroy` to true like the instructions said. Making the documentation a little bit clear so that someone like me doesn't waste their time in future.
-
- 10 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
In some cases there is a difference between the two, we should always be doing one or the other. For convenience, `type_cast` is still a private method on type, so new types that do not need different behavior don't need to implement two methods, but it has been moved to private so it cannot be used accidentally.
-
- 28 5月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
`ActiveRecord::ConnectionAdapters::Type::Value` => `ActiveRecord::Type::Value`
-
- 27 5月, 2014 1 次提交
-
-
由 Arthur Neves 提交于
Now the internal reflections will hold a reference to its public representation, so when the outside world calls `Account.reflection` we can build a list of public reflections.
-
- 25 5月, 2014 1 次提交
-
-
由 Arthur Neves 提交于
Fix habtm reflection Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/counter_cache.rb activerecord/lib/active_record/reflection.rb activerecord/test/cases/reflection_test.rb
-
- 21 5月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
-
- 13 4月, 2014 1 次提交
-
-
由 Akshay Vishnoi 提交于
-
- 28 9月, 2013 1 次提交
-
-
由 kennyj 提交于
-
- 12 8月, 2013 2 次提交
-
-
由 Ben Woosley 提交于
Restore the use of `#add_to_target` for nested attribute updates on existing records, and don't bother updating the association if the update is going to be rejected anyway. This requires adding a `skip_callbacks` argument to `#add_to_target` so that we don't call the callbacks multiple times in this case, which is functionally an application of existing association data, rather than an addition of a new record to the association.
-
由 Dr.(USA) Joerg Schray 提交于
Issue #1: :before_add callback is called when nested attributes assignment assigns to existing record if the association is not yet loaded Issue #2: Nested Attributes assignment does not affect the record in the association target when callback triggers loading of the association
-
- 14 6月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
-