Lauro Caetano
1f31488499
Make the reflections cache work with strings as its keys.
2014-04-09 21:23:43 -03:00
Rafael Mendonça França
c7d009b35e
Merge pull request #14671 from arthurnn/travis_memcache
...
add services: memcache to travis
2014-04-09 18:09:56 -03:00
Arthur Neves
45195b3135
add services: memcache to travis
2014-04-09 17:06:54 -04:00
Aaron Patterson
1368311eec
Merge pull request #14668 from laurocaetano/source_option_with_string_value
...
The :source option for has_many => through should accept String values.
2014-04-09 11:15:12 -07:00
Lauro Caetano
a91e5ff2cb
The source
option for has_many => through
should accept String
...
values.
With the changes introduced by 16b70fddd4dc7e7fb7be108add88bae6e3c2509b
it was expecting the value to be a Symbol, while it could be also a
String value.
2014-04-09 14:57:30 -03:00
Rafael Mendonça França
7b75b678cf
Merge pull request #14665 from andrielfn/avoid-uri-parsing
...
Avoid URI parsing
2014-04-09 14:20:56 -03:00
Andriel Nuernberg
85e424de6c
Avoid URI parsing
...
This parsing is unecessary once the Request object already has the
needed information.
2014-04-09 14:19:53 -03:00
Rafael Mendonça França
7142ff8f3d
Merge pull request #14667 from lucasmazza/require-per-thread-registry
...
Add missing require so requiring `active_support/cache` works again.
2014-04-09 14:12:21 -03:00
Lucas Mazza
0645a1a8ee
Add missing require so requiring active_support/cache
works again.
2014-04-09 14:08:47 -03:00
Rafael Mendonça França
b053a47b3e
depend_on_asset is not required anymore on sprockets-rails 2.1.2
2014-04-09 14:07:31 -03:00
Rafael Mendonça França
040a1dbb11
Merge pull request #14654 from Alamoz/secret_key
...
Expand explanation of how to set secrets.yml.
2014-04-09 13:05:44 -03:00
Yves Senn
7cf46ad889
upgrading section for 4.1 is no longer WIP. [ci skip]
2014-04-09 11:23:33 +02:00
Adrien Lamothe
a4e5587236
Expand explanation of how to set secrets.yml. [ci skip]
2014-04-08 21:18:26 -07:00
Arun Agrawal
e1178297ae
Merge pull request #14653 from vdmgolub/patch-1
...
Guides: minor typo fixed in Asset Pipeline guide
2014-04-09 07:59:28 +05:30
Guillermo Iguaran
aff37a9ed2
Merge pull request #14652 from Emily/duration_eqls
...
Fixed problem where `1.day.eql?(1.day)` is false
2014-04-08 21:13:21 -05:00
Vadim Golub
fec69b9b8d
Guides: minor typo fixed [ci skip]
2014-04-09 02:54:42 +03:00
Emily Dobervich
5aeb3cd3ac
Fixed problem where 1.day.eql?(1.day)
is false
...
This fixes:
1.second.eql?(1.second) #=> false
The new `eql?` requires that `other` is an `ActiveSupport::Duration`.
This requirement makes `ActiveSupport::Duration`'s behavior consistent
with other numeric types in Ruby.
1.eql?(1.0) #=> false
1.0.eql?(1) #=> false
1.second.eql?(1) #=> false (was true)
1.eql?(1.second) #=> false
{ 1 => "foo", 1.0 => "bar" }
#=> { 1 => "foo", 1.0 => "bar" }
{ 1 => "foo", 1.second => "bar" }
# now => { 1 => "foo", 1.second => "bar" }
# was => { 1 => "bar" }
And though the behavior here hasn't changed, for reference:
1 == 1.0 #=> true
1.0 == 1 #=> true
1 == 1.second #=> true
1.second == 1 #=> true
2014-04-08 16:24:35 -07:00
Rafael Mendonça França
30a41e76f6
new CHANGELOGs entries are in the top [ci skip]
2014-04-08 17:34:34 -03:00
Rafael Mendonça França
c28742f611
Merge pull request #14647 from matiaskorhonen/updates-maintenance-policy
...
Updates the maintenance policy with new Rails versions
2014-04-08 15:22:34 -05:00
Matias Korhonen
f0125a19b9
Updates the maintenance policy with new Rails versions
2014-04-08 23:18:49 +03:00
David Heinemeier Hansson
304d2f19c8
Dont abbreviate that which needs no abbreviation
2014-04-08 21:12:36 +02:00
David Heinemeier Hansson
10570cfd5b
Dont encourage aliases now that we have variants
2014-04-08 21:12:36 +02:00
David Rodríguez de Dios
eb2d555f5c
Update debugging guide to use byebug
2014-04-08 20:59:28 +02:00
David Heinemeier Hansson
4b0c8a9467
Use short-form for the scaffold render calls and drop the needless test
2014-04-08 20:57:24 +02:00
David Rodríguez de Dios
d8a4e48220
Update Gemfile templates to provide correct debugger
2014-04-08 20:57:12 +02:00
David Rodríguez de Dios
7901ae13a1
Keep debugger support only for rubies < 2.0.0
2014-04-08 20:55:23 +02:00
Rafael Mendonça França
75e0ee861f
Merge pull request #14633 from matthewd/narrow_database_url
...
Only apply DATABASE_URL for Rails.env
2014-04-08 11:57:47 -05:00
Matthew Draper
d72a0cbc80
Drop in @jeremy's new database.yml template text
...
In passing, allow multi-word adapters to be referenced in a URL:
underscored_name must become hyphened-name.
2014-04-09 01:46:48 +09:30
Matthew Draper
88cd65b174
Don't deprecate after all
2014-04-09 00:58:44 +09:30
Matthew Draper
615e0dcdf1
Less ambition, more deprecation
...
The "DATABASE_URL_*" idea was moving in the wrong direction.
Instead, let's deprecate the situation where we end up using
ENV['DATABASE_URL'] at all: the Right Way is to explicitly include it in
database.yml with ERB.
2014-04-09 00:17:13 +09:30
Matthew Draper
8f23c22008
Ensure we correctly and immediately load all ENV entries
...
.. even when the supplied config made no hint that name was relevant.
2014-04-08 15:15:08 +09:30
Matthew Draper
23692184bb
Give a deprecation message even when the lookup fails
...
If the supplied string doesn't contain a colon, it clearly cannot be a
database URL. They must have intended to do a key lookup, so even though
it failed, give the explanatory deprecation warning, and raise the
exception that lists the known configs.
Conveniently, this also simplifies our logical behaviour: if the string
matches a known configuration, or doesn't contain a colon (and is
therefore clearly not a URL), then we output a deprecation warning, and
behave exactly as we would if it were a symbol.
2014-04-08 15:15:07 +09:30
Matthew Draper
de9f2f63b8
Rearrange the config merger some more
...
This seems to simplify the operative part. Most importantly, by
pre-loading all the configs supplied in ENV, we ensure the list is
complete: if the developer specifies an unknown config, the exception
includes a list of valid ones.
2014-04-08 15:15:05 +09:30
Rafael Mendonça França
0ec047533a
entry is always a Hash
2014-04-08 15:15:04 +09:30
Rafael Mendonça França
d035ba143a
Check env_url only once
2014-04-08 15:15:03 +09:30
Rafael Mendonça França
2b6d1da6b4
Only call DEFAULT_ENV proc one time
2014-04-08 15:15:01 +09:30
Rafael Mendonça França
d459f751c9
Test DATABASE_URL has precendance over DATABASE_URL_#{environment}
2014-04-08 15:15:00 +09:30
Rafael Mendonça França
e533826f48
Make sure DEFAULT_URL only override current environment database
...
configuration
2014-04-08 15:14:58 +09:30
Matthew Draper
2b817cde62
Only apply DATABASE_URL for Rails.env
...
As we like ENV vars, also support DATABASE_URL_#{env}, for more obscure
use cases.
2014-04-08 15:14:26 +09:30
Godfrey Chan
77692ff9c3
Ensure we are looking with string keys
2014-04-07 19:08:08 -07:00
Godfrey Chan
a5664fe27b
Follow up to bbe7fe41 to fix enum leakage across classes.
...
The original attempt didn't really fix the problem and wasn't testing the
problematic area. This commit corrected those issues in the original commit.
Also removed the private `enum_mapping_for` method. As `defined_enums` is now a
method, this method doesn't provide much value anymore.
2014-04-07 18:52:21 -07:00
Rafael Mendonça França
3f5eb59f7a
Merge pull request #14634 from laurocaetano/fix_reorder
...
Build the reverse_order on its proper method.
2014-04-07 16:31:14 -05:00
Rafael Mendonça França
9575c82097
Merge pull request #14635 from eileencodes/remove-check-for-present
...
remove check for present? from delete_all method
2014-04-07 16:01:12 -05:00
Rafael Mendonça França
e1404ec824
Rails.application should be set inside before_configuration hook
...
Fixes #14620
2014-04-07 17:35:00 -03:00
eileencodes
2512bd717b
remove check for present? from delete_all
...
Passing in a blank string is a bug so there's no reason
to check for a blank string.
2014-04-07 16:11:42 -04:00
Carlos Antonio da Silva
70c83f49f8
Remove useless begin..end
2014-04-07 16:53:58 -03:00
Lauro Caetano
6c311e0b75
Build the reverse_order on its proper method.
...
The reverse_order method was using a flag to control if the order should
be reversed or not. Instead of using this variable just build the reverse order
inside its proper method.
This implementation was leading to an unexpected behavior when using
reverse_order and then applying reorder(nil).
Example:
Before
Post.order(:name).reverse_order.reorder(nil)
# => SELECT "posts".* FROM "posts" ORDER BY "posts"."id" DESC
After
Post.order(:name).reverse_order.reorder(nil)
# => SELECT "posts".* FROM "posts"
2014-04-07 16:23:34 -03:00
Rafael Mendonça França
6bbbe0b651
Merge pull request #14632 from matthewd/escape_bytea
...
Use connection-specific bytea escaping
2014-04-07 12:23:29 -05:00
Matthew Draper
c4bdca19a7
Use connection-specific bytea escaping
...
In our normal usage, it's rare for this to make a difference... but is
more technically correct.
As well as a spec that proves this is a good idea, let's also add a more
sane-looking one that just covers basic to_sql functionality. There
aren't many places where we actually use escape_bytea, but that's one
that won't be going away.
2014-04-08 00:36:30 +09:30
Santiago Pastorino
83e9e193f8
Merge pull request #14631 from laurocaetano/fix_count_with_order
...
Ignore order when doing count.
2014-04-07 12:01:39 -03:00