Commit Graph

24639 Commits

Author SHA1 Message Date
Jon Leighton
4dd985ae95 Don't reference ActiveRecord::Base in initializers/wrap_parameters.rb. Use config.active_record instead. This yields about a 20% decrease in startup time because it means that the connection is not created immediately on startup. Of course, this is only useful if you are not going to immediately use the database after startup. 2011-08-16 16:40:38 +01:00
Jon Leighton
0d5a6f68df In 1efd88283e, ConnectionAdapters was put under eager_autoload. Due to the requires in that file, this caused ConnectionSpecification to be loaded, which references ActiveRecord::Base, which means the database connection is established. We do not want to connect to the database when Active Record is loaded, only when ActiveRecord::Base is first referenced by the user. 2011-08-16 16:40:16 +01:00
Santiago Pastorino
c6e57467a6 Revert "Merge pull request #2543 from htanata/unused_require_in_ar_test"
This reverts commit 87152f2604, reversing
changes made to 0d3615f04c.
2011-08-16 09:24:49 -03:00
Santiago Pastorino
87152f2604 Merge pull request #2543 from htanata/unused_require_in_ar_test
Remove unused require in activerecord/test/cases/attribute_methods_test.rb
2011-08-16 05:22:27 -07:00
Hendy Tanata
21e2eeacff Remove unused require. 2011-08-16 12:40:57 +08:00
Jon Leighton
0d3615f04c Fix tzinfo require (it broke test_raises_when_an_invalid_timezone_is_defined_in_the_config in railties) 2011-08-16 02:42:30 +01:00
Jon Leighton
f76842f57e Fix wrap_parameters initializer template 2011-08-16 02:28:13 +01:00
Jon Leighton
bfb9e61a9f Be more lazy about creating time zone objects. Decreases startup time by about 10%. (#734) 2011-08-16 01:33:34 +01:00
Jon Leighton
6c5f67cac1 Don't refer to ActionController::Base in the wrap_parameters initializer - use config object instead. Cuts about 15% off the load time. (#734) 2011-08-16 00:59:59 +01:00
Jon Leighton
03a045b306 Bump arel dependency 2011-08-15 23:10:16 +01:00
Jon Leighton
c3dcb795f1 Use new SelectManager#source method 2011-08-15 23:10:16 +01:00
Jon Leighton
cc206a3507 Use new SelectManager#projections= method 2011-08-15 23:10:16 +01:00
Jon Leighton
12aaad0848 use update.key instead of update.ast.key. make better use of select manager. 2011-08-15 23:10:16 +01:00
Jon Leighton
8778c82e32 Use a SelectCore rather than a full SelectManager 2011-08-15 23:10:15 +01:00
Jon Leighton
fe0ec85541 Refactor building the update manager 2011-08-15 23:10:15 +01:00
Jon Leighton
43b99f290a Support for multi-table updates with limits, offsets and orders 2011-08-15 23:10:15 +01:00
Jon Leighton
128d006242 Support updates with joins. Fixes #522. 2011-08-15 23:10:15 +01:00
David Heinemeier Hansson
9482554f31 Added Array#prepend as an alias for Array#unshift and Array#append as an alias for Array#<< [DHH] 2011-08-15 16:56:33 -05:00
Jon Leighton
bb4e790dff Merge pull request #2539 from arunagw/delegate_expl
Delegate expl
2011-08-15 13:32:52 -07:00
Arun Agrawal
83eec4ca4c Requiring delegate. 2011-08-16 01:36:21 +05:30
Jon Leighton
b2469283a7 Removing unnecessary require, solve 'circular require considered harmful' warning. 2011-08-16 01:32:52 +05:30
Santiago Pastorino
fd29b4e47f Fix typo 2011-08-15 15:35:47 -03:00
Santiago Pastorino
4ca605b71b rake assets:precompile executes in production environment as default if RAILS_ENV was not provided 2011-08-15 15:31:47 -03:00
Santiago Pastorino
b01cc2241c Merge pull request #2536 from arunagw/unused_var
Unused variable removed.
2011-08-15 10:55:52 -07:00
Jon Leighton
ebb2e9423f Update travis config on @joshk's instructions 2011-08-15 17:23:15 +01:00
Arun Agrawal
45ccd64866 Unused variable removed. 2011-08-15 21:49:12 +05:30
Jon Leighton
c80876f778 Document Object#public_send 2011-08-15 16:26:37 +01:00
Jon Leighton
2e2f3f5a46 Add a test for delegating a method ending in '=' as this is a special case. 2011-08-15 16:07:49 +01:00
Jon Leighton
57423d815b Ensure empty has_many :through association preloaded via joins is marked as loaded. Fixes #2054. 2011-08-15 16:01:01 +01:00
Jon Leighton
4c743d9fce Merge pull request #2534 from arunagw/public_send_require
Need to include public_send
2011-08-15 06:46:59 -07:00
Arun Agrawal
10b99f2826 Need to include public_send 2011-08-15 19:13:25 +05:30
Jon Leighton
27da0c5480 Split up the definitions in Module#delegate depending on :allow_nil, and don't use exceptions for flow control in the :allow_nil => true case. 2011-08-15 13:56:04 +01:00
Jon Leighton
63d100ea35 Fix the line number in the backtrace when Module#delegate raises 2011-08-15 13:03:28 +01:00
Jon Leighton
7b56fb034a Fix private methods which are delegated to. This previously worked because Module#delegate previously ignored method visibility. 2011-08-15 12:38:44 +01:00
Jon Leighton
8bba95f293 Just do the method call directly in Module#delegate, if we can (we cannot for method names ending in '='). Two reasons: 1) it's faster, see https://gist.github.com/1089783 and 2) more importantly, delegate should not allow you to accidentally call private or protected methods. 2011-08-15 12:38:38 +01:00
Jon Leighton
6f4b405250 Backport Object#public_send to 1.8 so that we can implement Module#delegate such that non-public methods raise 2011-08-15 12:08:23 +01:00
José Valim
652ab436db Ensure changing RAILS_GROUPS will load the proper dependencies. 2011-08-14 10:52:46 -07:00
José Valim
99f87c9ad3 Merge pull request #2527 from cesario/fix_2511
Methods like status and location are interfering with redirect_to [Closes #2511]
2011-08-14 10:04:14 -07:00
Franck Verrot
75dd33a0ae Methods like status and location are interfering with redirect_to [Closes #2511] 2011-08-14 19:00:30 +02:00
Xavier Noria
bf2b9d2de3 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	RELEASING_RAILS.rdoc
	actionpack/lib/sprockets/railtie.rb
	actionpack/test/template/sprockets_helper_test.rb
	activerecord/test/cases/calculations_test.rb
	railties/guides/source/3_1_release_notes.textile
	railties/guides/source/active_resource_basics.textile
	railties/guides/source/command_line.textile
2011-08-13 16:30:07 -07:00
Waynn Lue
f566fb32c4 "suits" is correct here, not "suites" 2011-08-13 16:22:35 -07:00
Oge Nnadi
aa0d3cece8 Typo fix 2011-08-13 16:22:35 -07:00
Sebastian Martinez
0196f0feb1 Some fixes on the 3_1_release_notes guide. 2011-08-13 16:22:35 -07:00
geemus
53e1a9d411 update abstract_controller callbacks to document meta-programmed filters 2011-08-13 16:22:35 -07:00
Vishnu Atrai
54cd73e20d ActiveModel::Validations basic guide 2011-08-13 16:22:35 -07:00
Florent Guilleux
56efdbc626 Document exclamation point on dynamic finders 2011-08-13 16:22:34 -07:00
Emili Parreño
1b0d03b5db update rails on rack guide, section 2 needs to be changed or maybe deleted 2011-08-13 16:22:34 -07:00
Mr. Wolfe
635c1ca007 Revert "update rails on rack guide, section 2 needs to be changed or maybe deleted"
This reverts commit 7a4e545eccf834cb620df0f909ef3f4bec4e6608.
2011-08-13 16:22:34 -07:00
Mr. Wolfe
3b4e7c9f8e update rails on rack guide, section 2 needs to be changed or maybe deleted 2011-08-13 16:22:34 -07:00
Waynn Lue
76158146eb comma is more appropriate here 2011-08-13 16:22:34 -07:00