Commit Graph

2582 Commits

Author SHA1 Message Date
Manfred Stienstra
8326b95169 Free MySQL::Result objects after a call to execute [#1416 state:resolved]
No freeing Result objects causes the MySQL driver to free result sets
at undefined times, this can lead to erratic performance in your
application.

Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
2008-12-18 19:19:36 +00:00
Frederick Cheung
9c7fe7c672 Don't include table_name twice 2008-12-18 19:19:36 +00:00
Frederick Cheung
c9ab7098be Ensure :include checks joins when determining if it can preload [#528 state:resolved] 2008-12-18 19:19:36 +00:00
Emilio Tagua
9cf6b1b15e Add missing model files so tests can run isolated [#1506 state:resolved]
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
2008-12-18 19:19:36 +00:00
Frederick Cheung
707d0dd3e1 Fix preloading of belongs_to with null foreign key generating useless query [#1027 state:resolved] 2008-12-18 19:19:35 +00:00
Frederick Cheung
428e77bf0f Make exceptions raise from find_by_foo! have a more helpful message [#1567 state:resolved] 2008-12-18 19:19:35 +00:00
Daniel Luz
c4023cbe20 Update documentation for default_scope
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-12-16 14:34:02 +01:00
Xavier Noria
46c7dd2348 normalize author names in changelogs [#1495 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-12-16 14:33:32 +01:00
Joshua Peek
ed70830713 Switch to Rack based session stores. 2008-12-15 16:33:31 -06:00
Hongli Lai (Phusion)
a392f34fb4 Require mocha >= 0.9.3, older versions don't work anymore [#1579 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-12-15 14:47:19 -06:00
Frederick Cheung
455c7f9e37 Don't use the transaction instance method so that people with has_one/belongs_to :transaction aren't fubared
[#1551 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-12-10 15:11:42 -08:00
Jeremy Kemper
d45e2c733d Merge branch 'master' of git@github.com:rails/rails 2008-12-10 14:53:18 -08:00
Jeremy Kemper
b30ae19748 Revert "Fix: counter_cache should decrement on deleting associated records."
[#1196 state:open]

This reverts commit 05f2183747.
2008-12-10 14:48:12 -08:00
Bruce Krysiak
aa5cdb0d47 Added a :camelize option to ActiveRecord and Hash to_xml serialization and from_xml deserialization
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-12-10 20:28:05 +01:00
Emilio Tagua
96b815d7e8 Fix test names collision.
[#1549 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-12-10 11:10:22 -08:00
Jeremy Kemper
9539543026 Add ActiveRecord::VERSION autoload 2008-12-10 11:01:04 -08:00
Emilio Tagua
05f2183747 Fix: counter_cache should decrement on deleting associated records.
[#1195 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-12-10 10:59:52 -08:00
Frederick Cheung
355f41d8aa Rework ActiveSupport::OrderedHash to make lookups faster
[#1352 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-12-10 09:07:47 -08:00
Jeremy Kemper
e8c4939fb3 Benchmark.ms 2008-12-09 11:17:11 -08:00
Jeremy Kemper
9b22e56d89 Changelog entry for #1294 2008-12-08 15:59:42 -08:00
Akira Matsuda
c3b87dd4c9 Make word separator in AR validation error messages configurable.
[#1294 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-12-08 15:55:02 -08:00
Ben Symonds
091e6f791a Change field_changed? method to handle the case where a nullable integer column is changed from 0 to '0'
[#1530 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-12-08 15:42:13 -08:00
Pratik Naik
dbbae5e00e Merge with docrails 2008-12-07 03:27:53 +01:00
Mike Ferrier
566a3dce67 Make NoMethodError message more descriptive when an undefined message has been sent to an association [#1515 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-12-04 13:31:18 -06:00
miloops
97403ad5fd Add :having option to find, to use in combination with grouped finds. Also added to has_many and has_and_belongs_to_many associations.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1028 state:committed]
2008-12-01 20:22:31 +01:00
Foliosus
0c4ba90aa1 Removed extra 'as' in :joins clause for habtm preloading
Signed-off-by: Michael Koziarski <michael@koziarski.com>

[#1405 state:committed]
2008-12-01 20:00:19 +01:00
Paul
9a4d557713 Ensure hash conditions on referenced tables are considered when eager loading with limit/offset. [#1404 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-11-26 15:25:39 +01:00
Jeremy Kemper
ad93212f79 Rename use_transactional_fixtures? so it doesn't collide with the superclass_delegating_accessor's query method 2008-11-25 23:50:57 -08:00
Jeremy Kemper
104f3a5776 Add config.preload_frameworks to load all frameworks at startup. Default to false so Rails autoloads itself as it's used. 2008-11-24 18:43:04 -08:00
Joshua Peek
835be0cbed missed ActiveRecord::Migrator 2008-11-24 12:31:16 -06:00
Joshua Peek
d6b923adbd get activerecord tests passing with lazy loading 2008-11-24 12:17:07 -06:00
Joshua Peek
21901e9345 fixtures depends on dependencies 2008-11-24 12:17:07 -06:00
Joshua Peek
fffb1da3f2 require json lib when serialization is loaded 2008-11-24 11:52:29 -06:00
Joshua Peek
703fecb4fc Add LAZY env flag for testing autoload/lazy load feature 2008-11-24 11:37:57 -06:00
Joshua Peek
7254d23764 Autoload ActiveRecord files 2008-11-24 11:14:24 -06:00
David Heinemeier Hansson
db6b3a1f2c Docfix [#1444 state:committed] 2008-11-23 13:43:59 +01:00
Ken Collins
8e4624be9e Remove SQL Server cases from tests for latest adapter work to pass rails expected behavior.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-19 18:00:56 +01:00
Pratik Naik
9c3c42d8ea Remove reset! as a connection#checkout callback 2008-11-19 21:18:07 +05:30
David Heinemeier Hansson
51a19ae2bf Assume that the next version is going to be 2.3 for now 2008-11-19 14:12:38 +01:00
Sven Fuchs
12118963ac use :en as a default locale (in favor of :en-US)
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-18 14:23:53 +01:00
Tom Stuart
32cb2345a5 Fix default_scope to work in combination with named scopes
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-17 22:00:14 +01:00
Joshua Peek
e6c51051e4 Ensure shared default_scoping stack is duped before assigning to thread local 2008-11-16 13:52:21 -06:00
Pratik Naik
2530d0eea8 Added default_scope to Base [#1381 state:committed] (Paweł Kondzior) 2008-11-16 23:36:41 +05:30
Pratik Naik
d9f460a39b Ensure @@already_loaded_fixtures is initialized before use 2008-11-16 22:21:05 +05:30
David Heinemeier Hansson
ca23287b44 Revert "Added default_scope to Base [#1381 state:committed] (Paweł Kondzior)" -- won't gel with threads.
This reverts commit ff594b2bc9.
2008-11-16 16:35:52 +01:00
David Heinemeier Hansson
ff594b2bc9 Added default_scope to Base [#1381 state:committed] (Paweł Kondzior) 2008-11-16 16:01:18 +01:00
Jeremy Kemper
5fe543b629 Add create_fixtures method for tests 2008-11-15 12:31:54 -08:00
Jeremy Kemper
160b8a8344 Set up fixtures for AR tests 2008-11-15 12:30:02 -08:00
Jeremy Kemper
eeea1a26ec Merge branch 'master' into testing 2008-11-15 12:21:04 -08:00
Will Bryant
789a3f5b03 Moved the * strings out of construct_finder_sql to a new default_select method so it can be overridden by plugins cleanly
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1371 state:resolved]
2008-11-15 18:26:41 +01:00