Andrew White
74722d66d3
Fix failing test missed for the past year :(
...
When optimized path helpers were re-introduced in d7014bc the test added
in a328f2f broke but no-one noticed because it wasn't being run by the
test suite.
Fix the test by checking for nil values or empty strings after the args
have been parameterized.
2013-07-17 08:56:34 +01:00
Arun Agrawal
96310f69e1
Added routing in test for actionpack
2013-07-17 08:55:24 +01:00
Yves Senn
c212cfecb1
Revert "Merge pull request #11120 from awilliams/ar_mysql2_boolean_quoting"
...
This reverts commit cb1d07e43926bcec95cb8b4a663ca9889173395a, reversing
changes made to 754a373e301d2df0b12a11083405252722bc8366.
2013-07-17 09:51:22 +02:00
Aaron Patterson
6356d42093
parent_table is only used internally
2013-07-16 16:21:52 -07:00
Aaron Patterson
85fe5edcec
decouple the manager class from building join constraints
2013-07-16 13:41:24 -07:00
Aaron Patterson
743b67508e
cache the klass member of the reflection
2013-07-16 13:35:37 -07:00
Aaron Patterson
560517689c
cache the scope chain on the stack and eliminate i
2013-07-16 11:54:46 -07:00
Aaron Patterson
dbdaf75777
just push on to the scope chain items. Oops! (thanks @carlosantoniodasilva)
2013-07-16 11:37:53 -07:00
Aaron Patterson
5b83f46a19
use Relation#merge to combine scope chain items
2013-07-16 11:36:59 -07:00
Aaron Patterson
e70da0e1a3
make sure scope_chain_items has consistent types
2013-07-16 11:21:46 -07:00
Xavier Noria
9eb0cd28c9
removes the obsolete private method column_methods_hash [ Closes #11406 ]
2013-07-16 17:27:58 +02:00
Andrew White
1555a1800e
Skip Rack applications and redirects when generating urls
...
When generating an unnamed url (i.e. using `url_for` with an options
hash) we should skip anything other than standard Rails routes otherwise
it will match the first mounted application or redirect and generate a
url with query parameters rather than raising an error if the options
hash doesn't match any defined routes.
Fixes #8018
2013-07-16 13:39:17 +01:00
Carlos Antonio da Silva
c238a6cc7c
Merge pull request #11458 from arunagw/fix_usage_file
...
Fixed USAGE file for generator [ci skip]
2013-07-16 05:11:46 -07:00
Arun Agrawal
0b5b32ef27
Fixed USAGE file for generator [ci skip]
2013-07-16 14:09:19 +02:00
Yves Senn
525d7c30d0
Merge pull request #11435 from kennyj/move_to_query_cache
...
Move initializing process for @query_cache to QueryCache module.
2013-07-16 04:54:48 -07:00
kennyj
e8c387e834
Move initializing process for query cache to ActiveRecord::ConnectionAdapters::QueryCache module.
2013-07-16 20:49:48 +09:00
Yves Senn
cb1d07e439
Merge pull request #11120 from awilliams/ar_mysql2_boolean_quoting
...
Fixes AR mysql2 adapter incorrectly casting boolean values
2013-07-16 03:22:36 -07:00
awilliams
41bd94b7ef
Unifies mysql and mysql2 casting of booleans
...
Using the mysql2 adapter, boolean values were sometimes being incorrectly cast
to 't' or 'f'. This changes the cast to match the mysql adapter behavior, ie 1 and 0.
2013-07-16 12:14:09 +02:00
Yves Senn
754a373e30
change_column
for PG adapter respects :array
option.
2013-07-16 10:56:22 +02:00
Guillermo Iguaran
c612638a25
Merge pull request #11419 from simi/generator_generator_test
...
Added generated unit test for generator generator.
2013-07-16 00:52:47 -07:00
Josef Šimánek
5ecd125a62
Added generated unit test for generator generator and new test:generators rake task included in test:all rake task.
2013-07-16 09:38:13 +02:00
Guillermo Iguaran
8df284a0e9
Lock mysql2 version to 0.3.11 since 0.3.12 is failing right now. Check #11457 for details
2013-07-16 02:27:13 -05:00
Aaron Patterson
a929b4d4c5
save another array allocation
2013-07-15 16:29:45 -07:00
Aaron Patterson
d9a0587d3e
removing useless assingment
2013-07-15 16:29:21 -07:00
Aaron Patterson
9675c7da28
reorder bind parameters when merging relations
2013-07-15 16:29:01 -07:00
Aaron Patterson
d345ed40b5
use arel rather than slapping together SQL strings
2013-07-15 16:16:18 -07:00
Yves Senn
a618e9e9dd
Merge pull request #11451 from jetthoughts/11450_do_not_resave_destroyed_association
...
Do not re-save destroyed association on saving parent object
2013-07-15 11:17:25 -07:00
Paul Nikitochkin
372e809667
Do not re-save destroyed association on saving parent object
...
Closes #11450
2013-07-15 20:39:30 +03:00
Yves Senn
d7a1f98d8c
Merge pull request #11282 from arunagw/deprecation-removed-attribute-missing-activerecord
...
Remove deprecated `attribute_missing`.
2013-07-15 10:21:18 -07:00
Arun Agrawal
0d4075fb47
Remove deprecation warning from attribute_missing
...
for attributes that are columns.
2013-07-15 19:18:36 +02:00
Yves Senn
ea7620dce2
Merge pull request #11448 from arunagw/updated_middleware_test
...
No need to add config for x_sendfile_header
2013-07-15 05:13:39 -07:00
Arun Agrawal
3b03733d9e
Added CheckPending middleware in default
...
As this middleware comes by default in a new
rails app
Added test to check omit for CheckPending when
Active Record is not included.
2013-07-15 11:22:15 +02:00
Arun Agrawal
b5f8630591
No need to add config for x_sendfile_header
...
Rack::Sendfile is loaded by default now
2013-07-15 10:42:52 +02:00
Guillermo Iguaran
0b61cc730e
Rack::Sendfile is now included in middleware by default, change tests to reflect that
2013-07-15 00:33:09 -05:00
Santiago Pastorino
207fa5c11d
Revert "Don't use Rack::Sendfile middleware if x_sendfile_header is not present"
...
This reverts commit 19ac034bdc9be175eff7cf54208ba14b43d97681.
And allows webservers to configure X-Sendfile-Type.
Closes #11440 thanks to [@MSch]
Conflicts:
railties/lib/rails/application.rb
2013-07-15 01:20:49 -03:00
Santiago Pastorino
8833b82df0
Merge pull request #11434 from jetthoughts/new_save_transaction_bugfix
...
Remove extra decrement of transaction level
2013-07-14 20:06:01 -07:00
Yves Senn
5979bc9e11
Merge pull request #11439 from ernie/only-scan-strings-for-nodes
...
Blacklist->whitelist for reference scans in order!
2013-07-14 12:22:52 -07:00
Yves Senn
648afea0e4
re-introduce select_for_count
private method.
...
See da9b5d4a84 (commitcomment-3630064)
for discussion.
2013-07-14 21:00:39 +02:00
Ernie Miller
e2d8250814
Blacklist->whitelist for reference scans in order!
...
Stop special-casing Arel::Nodes as exempt from reference scanning in
order. Instead, only scan order values that are strings for a table
reference.
2013-07-14 13:53:38 -04:00
Paul Nikitochkin
e0d59e6219
#4566 : Remove extra decrement of transaction level
...
`rollback_active_record_state!` tries to restore model state on `Exception`
by invoking `restore_transaction_record_state` it decrement deep level by `1`.
After restoring it ensure that states to be cleared
and level decremented by invoking `clear_transaction_record_state`,
which cause the bug: because state already reduced in `restore_transaction_record_state`.
Removed double derement of transaction level
and removed duplicated code which clear transaction state for top level.
2013-07-14 20:35:31 +03:00
Guillermo Iguaran
b5e851e90b
Merge pull request #11437 from kennyj/fix_11393
...
Fix #11393 . Fix default rendered format when calling render method without :content_type option.
2013-07-14 10:30:59 -07:00
kennyj
ca85caca0d
Fix default rendered format problem when calling render method without :content_type option. Closes #11393 .
2013-07-15 02:11:43 +09:00
José Valim
9fbdd9d83e
Merge pull request #11433 from arunagw/removed_unused_task
...
railties Rakefile tweaks
2013-07-14 05:52:23 -07:00
Arun Agrawal
f6dd6310fc
Removed unused require from Rakefile
2013-07-14 14:46:32 +02:00
Arun Agrawal
8b2bde3c26
Removed unused broken task for update README [ci skip]
2013-07-14 14:42:02 +02:00
Xavier Noria
1e403f1d6d
Merge pull request #11425 from arunagw/actionview_api_generation
...
Actionview api generation
2013-07-14 04:55:20 -07:00
Yves Senn
f6d8654376
Merge pull request #11431 from ianfleeton/initialization_memoized_typo
...
memorized -> memoized typo fix [ci skip]
2013-07-14 03:56:20 -07:00
Ian Fleeton
0e262b3b64
memorized -> memoized typo fix [ci skip]
...
Reverts one line from 457b7ff9
2013-07-14 11:01:46 +01:00
Arun Agrawal
d4e1fcf7e5
Added actionview in API generation [ci skip]
...
CHANGELOG and LICENSE removed as suggested
2013-07-14 09:44:58 +02:00
Santiago Pastorino
5a52fbe1cb
Merge pull request #11424 from kennyj/fix_column_defaults_caching
...
Reset @column_defaults when assigning locking_column.
2013-07-13 22:02:05 -07:00