- 26 7月, 2015 2 次提交
-
-
由 Yasuo Honda 提交于
-
由 Sean Griffin 提交于
This is an alternate implementation of #20966. [Sean Griffin & presskey]
-
- 25 7月, 2015 1 次提交
-
-
由 Rafael Mendonça França 提交于
Encode the email address as prescribed in RFC 6068 section 2.
-
- 24 7月, 2015 6 次提交
-
-
由 Sean Griffin 提交于
Deep down in the association internals, we're calling `destroy!` rather than `destroy` when handling things like `dependent` or autosave association callbacks. Unfortunately, due to the structure of the code (e.g. it uses callbacks for everything), it's nearly impossible to pass whether to call `destroy` or `destroy!` down to where we actually need it. As such, we have to do some legwork to handle this. Since the callbacks are what actually raise the exception, we need to rescue it in `ActiveRecord::Callbacks`, rather than `ActiveRecord::Persistence` where it matters. (As an aside, if this code wasn't so callback heavy, it would handling this would likely be as simple as changing `destroy` to call `destroy!` instead of the other way around). Since we don't want to lose the exception when `destroy!` is called (in particular, we don't want the value of the `record` field to change to the parent class), we have to do some additional legwork to hold onto it where we can use it. Again, all of this is ugly and there is definitely a better way to do this. However, barring a much more significant re-architecting for what I consider to be a reletively minor improvement, I'm willing to take this small hit to the flow of this code (begrudgingly).
-
由 Sean Griffin 提交于
Remove unused rule and task from activerecord
-
由 Matthew Draper 提交于
We need stricter locking before we can unload
-
由 Akira Matsuda 提交于
this fixes a failing test case
-
由 Clayton Smith 提交于
-
由 Robin Dupret 提交于
The note regarding the `_prefix` and `_suffix` options is no longer useful since they were renamed specifically for this purpose. Also the given example doesn't show what these options enable and in which case they are really useful (when there are conflicting values for instance). Refs #20999. [Godfrey Chan & Robin Dupret]
-
- 23 7月, 2015 7 次提交
-
-
由 Kasper Timm Hansen 提交于
Rename the enum_prefix and enum_suffix options to _prefix and _suffix
-
由 Robin Dupret 提交于
This makes it more clear that they are reserved keywords and also it seems less redundant as the line already starts with the call to the `enum` method.
-
由 Robin Dupret 提交于
Fixes documentation typo.[ci skip]
-
由 Дмитро Будник 提交于
Documentation had extra colon after keyword.
-
由 Matthew Draper 提交于
Don't apply locking around basic #load / #require
-
由 Matthew Draper 提交于
That's outside our remit, and dangerous... if a caller has their own locking to protect against the natural race danger, we'll deadlock against it.
-
由 thedarkone 提交于
* only test the upgrade path, * add test to verify non upgrades can’t preempt, * add reentrancy assertion.
-
- 22 7月, 2015 8 次提交
-
-
由 Aaron Patterson 提交于
Now that we have encoding strategies, we can just walk the params hash once to encode as HWIA, and remove nils.
-
由 Aaron Patterson 提交于
we'll refactor deep munge mostly out of existence shortly
-
由 Aaron Patterson 提交于
This should have been done along with 8f8ccb99
-
由 Aaron Patterson 提交于
this just pushes the conditional in to the case / when so we can switch to method dispatch later
-
由 Aaron Patterson 提交于
there is no reason to `convert_hashes_to_parameters` with an assignemt flag. The caller knows whether or not it wants the value assigned. We should just change the uncommon case (not writing to the underlying hash) to just call the conversion method and return that value.
-
由 Aaron Patterson 提交于
only hashes are converted to parameter objects, so lets add a branch for them. This also removes a is_a? test for Parameters so we can be abstracted from the class.
-
由 Rafael Mendonça França 提交于
fix rails tests
-
由 Mehmet Emin İNAÇ 提交于
-
- 21 7月, 2015 16 次提交
-
-
由 Rafael Mendonça França 提交于
Extra caller details added to ActiveRecord::RecordNotFound
-
由 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
-
由 Rafael Mendonça França 提交于
add system! to fail fast in bin/setup
-
由 Rafael Mendonça França 提交于
remove `web-console` from API app generated Gemfile
-
由 Rafael Mendonça França 提交于
Deprecate the keys for association `restrict_dependent_destroy` errors in favor of new key names
-
由 Roque Pinel 提交于
Previously `has_one` and `has_many` associations were using the `one` and `many` keys respectively. Both of these keys have special meaning in I18n (they are considered to be pluralizations) so by renaming them to `has_one` and `has_many` we make the messages more explicit and most importantly they don't clash with linguistical systems that need to validate translation keys (and their pluralizations). The `:'restrict_dependent_destroy.one'` key should be replaced with `:'restrict_dependent_destroy.has_one'`, and `:'restrict_dependent_destroy.many'` with `:'restrict_dependent_destroy.has_many'`. [Roque Pinel & Christopher Dell]
-
由 Sean Griffin 提交于
Ensure that microsecond precision is only used for versions of mysql that support it.
-
由 Rafael Mendonça França 提交于
Remove unnecessary `dup` from Mapper `add_route`
-
由 Matthew Draper 提交于
Specifically, clean up if the thread is killed while it's blocked awaiting the lock... if we get killed on some other arbitrary line, the result remains quite undefined.
-
由 Matthew Draper 提交于
-
由 Matthew Draper 提交于
I accidentally discovered `assert_threads_not_stuck` couldn't fail, so the simplest solution was to prove they're all now working in both directions.
-
由 Rafael Mendonça França 提交于
titleizing the New Link
-
由 Thiago Pinto 提交于
-
由 Matthew Draper 提交于
If the thread isn't yet holding any form of lock, it has no claim over what may / may not run while it's blocked.
-
由 Jori Hardman 提交于
-
由 Sean Griffin 提交于
Fix minor typo in testing guide [ci skip]
-