| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
| |
This reverts commit 88cc1688d0cb828c17706b41a8bd27870f2a2beb, reversing
changes made to f049016cd348627bf8db0d72382d7580bf802a79.
|
|\
| |
| |
| |
| |
| | |
* master-sec:
CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml.
* Strip nils from collections on JSON and XML posts. [CVE-2013-0155] * dealing with empty hashes. Thanks Damien Mathieu
|
| | |
|
|\ \
| |/
|/|
| |
| | |
Conflicts:
guides/source/getting_started.md
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
[ci skip]
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These warnings were actually a bug in Ruby 2.0, the accessors should not
be raising such warnings, they are only meant for ivars.
-
Revert "fix warnings in Ruby 2.0"
This reverts commit 26702a6d3461f4a1c75165030b96886514ecb877.
-
Revert "Merge pull request #8282 from arunagw/warning_removed_for_ruby2"
This reverts commit f63d6544e45e78cda29c0c56fbdf3d9e1f405340, reversing
changes made to 3a890681fad8218305585036abed6d7463a44e41.
|
| |
| |
| |
| | |
module
|
| | |
|
| |
| |
| |
| |
| | |
They don't add any benefits over `assert object.blank?`
and `assert object.present?`
|
| |
| |
| |
| | |
method_missing with Marshal.dump and Marshal.load is changing in ruby 2.0.0 later.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I did this because to_date gives a very unhelpful error message if you
do not pass in a correct date. In the process I think this cleans up the
code nicely and even better it tends to be slightly faster than the
current implementation.
Benchmark
https://gist.github.com/4440875
|
| |
| |
| |
| |
| |
| | |
now lives in the application initializers.
Fix #8711
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Date, DateTime, Time and TimeWithZone can now be compared to infinity,
so it's now possible to create ranges with one infinite bound and
date/time object as another bound.
Ex.: @range = Range.new(Date.today, Float::INFINITY)
Also it's possible to check inclusion of date/time in range with
conversion.
Ex.: @range.include?(Time.now + 1.year) # => true
@range.include?(DateTime.now + 1.year) # => true
Ability to create date/time ranges with infinite bound is required
for handling postgresql range types.
|
| | |
|
| | |
|
|/ |
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
[ci skip]
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
minitest/autorun load minitest/spec polluting the global namespace with
the DSL that we don't want on Rails
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
This reverts commit 22bc12ec374b8bdeb3818ca0a3eb787dd3ce39d8.
REASON: We will remove the MiniTest::Spec from Rails and we need these
methods again
Conflicts:
activesupport/lib/active_support/test_case.rb
|
|\
| |
| | |
Remove 'assigned but unused variable' warning
|
| | |
|
|/ |
|
|
|
|
|
|
| |
Tagging every message in tests makes the logs really wide. It's great
for grepping, but annoying to open in an editor or a narrow terminal.
Try out a different approach: spit out a heading before each test.
|
| |
|
| |
|
| |
|
|
|
|
| |
with Rails 4.0.
|
|\
| |
| | |
WIP Refactor xml conversion to hash
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Three basic refactors in this PR:
* We extracted the logic into a method object. We now don't define a tone of extraneous methods on Hash, even if they were private.
* Extracted blocks of the case statement into methods that do the work. This makes the logic more clear.
* Extracted complicated if clauses into their own query methods. They often have two or three terms, this makes it much easier to see what they _do_.
We took care not to refactor too much as to not break anything, and put comments where we suspect tests are missing.
We think ActiveSupport::XMLMini might be a good candidate to move to a plugin in the future.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
dmitriy-kiriyenko/fix-double-callback-in-same-statement
Prevent callback from being set twice.
Conflicts:
activesupport/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When you add one callack in two separate `set_callback` calls - it is
only called once.
When you do it in one `set_callback` call - it is called twice.
This violates the principle of least astonishment for me. Duplicating
callback is usually an error. There is a correct and obvious way to do
anything without this "feature".
If you want to do
before_save :clear_balance, :calculate_tax, :clear_balance
or whatever, you should better do
before_save :carefully_calculate_tax
def carefully_calculate_tax
clear_balance
calculate_tax
clear_balance
end
And this even opens gates for some advanced refactorings, unlike the
first approach.
My assumptions are:
- Principle of least astonishment is violated, when callbacks are either
prevented from duplication, or not.
- Duplicating callbacks is usually an error. When it is intentional -
it's a smell of a bad design and can be approached without abusing
this "feature".
My suggestion is: do not allow duplicating callbacks in one callback
call, like it is not allowed in separate callbacks call.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
from core_ext/logger" (some confusion over deprecation)
This reverts commit d00f568a83a5159ed93618b1081bd17858536d1c.
|
| | |
| | |
| | |
| | | |
core_ext/logger
|