Commit Graph

49112 Commits

Author SHA1 Message Date
Rebecca Skinner
da1b830253 Digesting is now enabled by default in development 2015-01-13 14:34:10 +08:00
Sean Griffin
72570ea289 Merge pull request #18439 from mokhan/validates-acceptance-of-array
allow '1' or true for acceptance validation.
2015-01-12 12:06:00 -07:00
Yves Senn
0fee2d4085 Merge pull request #18462 from dmasur/patch-1
Removing :en in favor of default locale for duration#inspect
2015-01-12 19:39:26 +01:00
Dominik Masur
f76d1aa54d Removing :en in favor of I18n.default_locale in duration#inspect
Hi there,

i have an app without english as available locale. So i got an error when we try to inspect something like 1.day. This is done automatically when we use the dalli cache.

I would like to change the :en to ::I18n.default_locale to be sure that this is always constant and is an available locale.

Tests are all green with this change.

Calculating -------------------------------------
:locale => :en                              2.024k i/100ms
:locale => ::I18n.default_locale   2.236k i/100ms
-------------------------------------------------
:locale => :en                                  25.758k (±26.3%) i/s -    117.392k
:locale => ::I18n.default_locale       26.311k (±18.1%) i/s -    127.452k
2015-01-12 19:34:32 +01:00
Santiago Pastorino
da175a2b46 Relax Rack dependency
Rack is very carefully released, we should be able to upgrade minor
versions without much effort. We are a bunch of Rails core who are also
Rack core members so there won't be any issue with that. And in case
there's something wrong, we should fix on both sides.
Even though, doesn't seem like we will have a 1.7 version, this will be
useful as an example for when we go with Rack 2.0. We should ~> 2.0.
2015-01-12 15:32:33 -02:00
Abdelkader Boudih
eb7b9738c5 Merge pull request #18466 from davydovanton/error_message_doc
Fix description for ActiveModel::Errors#generate_message [skip ci]
2015-01-12 16:13:03 +00:00
Anton Davydov
095b92af6c Fix error messages scope [skip ci] 2015-01-12 18:21:56 +03:00
Xavier Noria
970fe27b02 Merge pull request #18460 from mechanicles/a-to-an-for-xml
Change 'a' to 'an' for 'XML' word [ci skip]
2015-01-12 08:29:43 +01:00
Matthew Draper
88308f4734 Merge pull request #18461 from zetsubo/patch-1
minor grammatical fix in documentation
2015-01-12 16:11:19 +10:30
Jade McGough
1cef759e1e minor grammatical fix in documentation 2015-01-12 00:38:10 -05:00
Santosh Wadghule
83dd559643 Change 'a' to 'an' for 'XML' word [ci skip] 2015-01-12 10:07:45 +05:30
Carlos Antonio da Silva
3adb05565c Merge pull request #18436 from deepj/fork-detection
Better fork detection in ActiveSupport::Testing::Isolation
2015-01-11 19:23:03 -02:00
Carlos Antonio da Silva
186d443721 Merge pull request #18456 from claudiob/remove-unused-fixtures-to-render
Remove unused AV fixtures from AP tests
2015-01-11 19:20:20 -02:00
Carlos Antonio da Silva
8ee052cf84 Merge pull request #18454 from claudiob/test-on-option-for-amv-callbacks
Add test for AM::Validation::Callbacks with :on
2015-01-11 19:13:34 -02:00
Carlos Antonio da Silva
c5bd8f445c Merge pull request #18455 from claudiob/remove-unused-deprecated_reload-method
Remove unused "deprecated_reload" method
2015-01-11 19:09:34 -02:00
claudiob
7d493a6020 Remove unused AV fixtures from AP tests
When `render` was moved from ActionPack to ActionView in acc8e259,
some fixtures required by the tests were duplicated, but they are
actually only required by ActionView tests.

To give one example, `double_render` is already defined [in the AV tests](72139d8d31/actionview/test/actionpack/controller/render_test.rb (L407))
and is never used in the ActionPack tests.
2015-01-11 13:01:13 -08:00
claudiob
d3927c8d18 Remove unused "deprecated_reload" method
The method was introduced in 66d0a01535 (diff-8cec05860729a3851ceb756f4dd90370R49)
for the "reset_changes is deprecated" test, but this test was successively
removed in 37175a24bd
2015-01-11 12:32:26 -08:00
claudiob
684cbee473 Add test for AM::Validation::Callbacks with :on
`before_validation` and `after_validation` from
ActiveModel::Validation::Callbacks accept an optional `:on` parameter
that was not previously documented or tested. For instance given

    before_validation :do_something, on: :create

then `object.valid?(:create)` will invoke `:do_something` while
`object.valid?` or `object.valid?(:anything_else)` will not.
2015-01-11 12:29:39 -08:00
Guillermo Iguaran
72139d8d31 Merge pull request #18448 from robertomiranda/has_secure_token_generator
Add has secure token to migration generator
2015-01-11 15:11:03 -05:00
Rafael Mendonça França
0e316ea2c4 Merge pull request #18451 from jlduran/guides-sql-caching
Re-add section in SQL Caching [ci skip]
2015-01-11 17:57:50 -02:00
Rafael Mendonça França
6c7af3a264 Merge pull request #18452 from claudiob/fix-broken-assertion
Fix assertion that was never run
2015-01-11 17:56:35 -02:00
claudiob
e4613c97c3 Fix assertion that was never run
In order to run whether the `welcome` method of the ActionMailer::Base
subclass raises an error, `message` must be called, otherwise the method
is not executed at all.

You could just replace with `def welcome; raise StandardError; end` and you
would still see a passing test.

This commit fixes the test so the assertion is actually executed, just like
any other tests in the file, where `.message` is called.
2015-01-11 11:50:29 -08:00
robertomiranda
5cca205114 Add Secure Token Generator 2015-01-11 14:42:54 -05:00
Jose Luis Duran
4d4f2df36e Re-add section in SQL Caching
This section was accidentally removed in 4b5e424441149cf0f61a8182f4a92999577ce59a, and partially re-added in dc14b893e5904acb37ac327478f3880f33094b7a.

[ci skip]
2015-01-11 17:17:21 -02:00
Rafael Mendonça França
7b47f422cf Merge pull request #18435 from kuldeepaggarwal/f-remove-unnecessary-require
No need of requiring `rbconfig`, it is by-default loaded
2015-01-11 16:13:22 -02:00
Rafael Mendonça França
b1c827bb6b Merge pull request #18445 from y-yagi/remove_hide_actions
remove autoload HideActions, no longer exist
2015-01-11 15:07:07 -02:00
yuuji.yaginuma
e3be421cc1 remove autoload HideActions, no longer exist 2015-01-11 21:13:59 +09:00
mo khan
140557e85f allow '1' or true for acceptance validation. 2015-01-10 22:47:47 -07:00
Sean Griffin
7bb6208697 Deprecate passing a column to quote
It's only used to grab the type for type casting purposes, and we would
like to remove the type from the columns entirely.
2015-01-10 15:45:47 -07:00
Sean Griffin
ac6e6545de Stop passing a column to quote in tests
I'm planning on deprecating the column argument to mirror the
deprecation in [arel].

[arel]: 6160bfbda1
2015-01-10 15:45:47 -07:00
Sean Griffin
268ee64e63 Stop passing a column to quote when finding by AR models
I'm planning on deprecating the column argument to mirror the
deprecation in [arel].

[arel]: 6160bfbda1
2015-01-10 15:45:46 -07:00
Sean Griffin
0b4fd69b8b Stop passing a column to quote when executing from a statement cache
I'm planning on deprecating the column argument to mirror the
deprecation in [arel].

[arel]: 6160bfbda1
2015-01-10 15:45:46 -07:00
Sean Griffin
a00854e515 Stop passing a column to quote in Relation#to_sql
I'm planning on deprecating the column argument to mirror the
deprecation in [arel].

[arel]: 6160bfbda1
2015-01-10 15:45:46 -07:00
Sean Griffin
e6ac56a848 Stop passing a column to quote when prepared statements are turned off
I'm planning on deprecating the column argument to mirror the
deprecation in [arel].

[arel]: 6160bfbda1
2015-01-10 15:45:46 -07:00
Guillermo Iguaran
2ee2072bba Merge pull request #18440 from robertomiranda/patch-3
Fix Typo SecureToken [ci skip]
2015-01-10 16:57:15 -05:00
Roberto Miranda
0f931f2ff0 Fix Typo SecureToken [ci skip] 2015-01-10 16:56:21 -05:00
Sean Griffin
134abedf19 Stop passing a column to quote in insert_fixture
I'm planning on deprecating the column argument to mirror the
deprecation in [arel].

[arel]: 6160bfbda1
2015-01-10 12:42:02 -07:00
Sean Griffin
7a09fc55c0 Stop special casing null binary data in logging
There's very little value in logging "<NULL binary data>" instead of
just "nil". I'd like to remove the column from the equation entirely,
and this case is preventing us from doing so.
2015-01-10 12:26:51 -07:00
Sean Griffin
4d5e660789 Don't attempt to save dirty attributes which are not persistable
This sets a precident for how we handle `attribute` calls, which aren't
backed by a database column. We should not take this as a conscious
decision on how to handle them, and this can change when we make
`attribute` public if we have better ideas in the future.

As the composed attributes API gets fleshed out, I expect the
`persistable_attributes` method to change to
`@attributes.select(&:persistable).keys`, or some more performant
variant there-of. This can probably go away completely once we fully
move dirty checking into the attribute objects once it gets moved up to
Active Model.

Fixes #18407
2015-01-10 12:07:46 -07:00
deepj
109721c466 Better fork detection in ActiveSupport::Testing::Isolation
Process.respond_to?(:fork) returns false if fork is not available.
More on http://www.ruby-doc.org/core-2.0.0/Process.html#method-c-fork
2015-01-10 16:45:02 +01:00
Kuldeep Aggarwal
90aef23e38 No need of requiring rbconfig, it is by-default loaded 2015-01-10 20:27:18 +05:30
Yves Senn
89470bbc5e Merge branch 'Prefer-IO_NULL'. Closes #18381. 2015-01-10 15:12:04 +01:00
Nobuyoshi Nakada
69e365d2f4 Use IO::NULL always 2015-01-10 15:11:05 +01:00
Yves Senn
e47d6a31a5 Merge pull request #18433 from koraktor/patch-1
Fix typo in PostresSQLAdapter's documentation [ci skip]
2015-01-10 13:49:34 +01:00
Sebastian Staudt
a4139a1674 Fix typo in PostresSQLAdapter's documentation 2015-01-10 13:15:03 +01:00
Yves Senn
a7621d7d53 formatting pass over CHANGELOGs. [ci skip] 2015-01-10 12:17:57 +01:00
Carlos Antonio da Silva
ea1d3d98b1 Remove note about supported plugins from the releasing docs
The last supported plugin on the list was protected_attributes, which is
not going to be supported anymore on Rails 5.

[ci skip]
2015-01-09 22:42:29 -02:00
Carlos Antonio da Silva
f4fbc03010 Remove support for the protected attributes gem
Related to #10690.
2015-01-09 22:42:29 -02:00
Guillermo Iguaran
d8b8a726e7 Merge pull request #18347 from robertomiranda/has_secure_token_base62
Switching SecureTokens to Base58
2015-01-09 18:50:48 -05:00
robertomiranda
47316feee0 Switch Secure Token generation to Base58
Update Secure Token Doc [ci skip]

remove require securerandom, core_ext/securerandom already do that ref 7e006057
2015-01-09 18:47:44 -05:00