Pratik Naik
9e7ec2a9f1
Simplify calculation scope building. Remove :order from associations as it is troublesome w/ calculation methods using postgresql.
2010-01-18 23:40:42 +05:30
Pratik Naik
3c4186b366
Remove construct_calculation_arel_with_included_associations because it's same as construct_finder_arel_with_included_associations
2010-01-18 23:40:42 +05:30
Pratik Naik
893524382a
No need to pass current_scoped_methods to construct_calculation_arel everytime
2010-01-18 23:40:42 +05:30
José Valim
728db5a932
Rake tasks should load generators from new paths.
2010-01-18 18:22:55 +01:00
Joshua Peek
68b76a38eb
Cleanup deprecation notices.
2010-01-18 09:49:38 -06:00
Paco Guzman
e27bfad6a5
Forgot to change named_scope to scope in an ArgumentError raise exception for duplication scopes related to commit d60bb0a9e4 [ #3736 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-18 16:36:08 +01:00
José Valim
9fffdc5cdb
Generators load path now will be Ruby load path. If you want to use rspec:install generator, you need generators/rspec/install_generator in your load path.
2010-01-18 16:21:11 +01:00
Pratik Naik
4c00c65c58
Simplify construct_finder_arel_* methods
2010-01-18 19:40:23 +05:30
Pratik Naik
2a2bc8e84a
Handle invalid query IN() generated when a blank array is supplied in hash conditions
2010-01-18 18:56:55 +05:30
Pratik Naik
8bb5274648
Get rid of Relation#order_clauses
2010-01-18 18:56:55 +05:30
Pratik Naik
8ba2902dd4
Fix the named_scope deprecation notice
2010-01-18 18:56:55 +05:30
José Valim
40c4a0036a
Ensure deprecated validate methods are invoked when they are private [ #3214 status:resolved]
2010-01-18 09:56:36 +01:00
Pratik Naik
6ce538d485
Add missing CHANGELOG entry about relations as scopes
2010-01-18 04:42:04 +05:30
Pratik Naik
d60bb0a9e4
Rename named_scope to scope
2010-01-18 04:38:19 +05:30
Pratik Naik
e1d507c7fb
Dont check for class equaity when merging relations
2010-01-18 04:28:21 +05:30
Pratik Naik
88de6b2de2
Inherit named scope class Scope from Relation
2010-01-18 04:24:24 +05:30
Pratik Naik
c6850d8361
Ensure that Scope#proxy_scope is always klass. Rename proxy_scope to klass too.
2010-01-18 00:03:18 +05:30
Pratik Naik
dca3de3bc7
Make relations work as scopes
2010-01-17 23:22:11 +05:30
Pratik Naik
f0cde5be54
Make sure named_scope names are not used as method names already
2010-01-17 21:34:41 +05:30
José Valim
c0d31ca41b
save(false) is gone, use save(:validate => false) instead.
2010-01-17 14:22:34 +01:00
José Valim
27d9836ad3
Add ActionDispatch::Railties::Subscriber and finish tidying up the logging.
2010-01-17 12:43:17 +01:00
Pratik Naik
54a043895f
Make merging of order values consistent
2010-01-17 14:19:41 +05:30
Pratik Naik
8d87c80c19
Make Relation#reload force load the records immediately
2010-01-17 04:25:59 +05:30
Pratik Naik
7921a73acd
Use relations to build scope for named scopes
2010-01-17 04:20:11 +05:30
Pratik Naik
b8b6621acb
Simplify Model.scoped definition
2010-01-17 03:54:52 +05:30
Pratik Naik
dba196cb7f
Merge docrails
2010-01-17 03:26:20 +05:30
Pratik Naik
6e3bee6cf1
Cache Model.arel_table
2010-01-17 03:14:17 +05:30
Pratik Naik
6806483b91
Use arel_table[] instead of unscoped[] to get arel attribute
2010-01-17 03:10:07 +05:30
Pratik Naik
0ab30637dd
Revert "Fix #microseconds conversion and #fast_string_to_time"
...
This reverts commit 717a2941e1 . Bunch of failures when running postgresql tests.
2010-01-17 03:04:11 +05:30
Pratik Naik
cd90dcb1bd
Rename Model.active_relation to Model.unscoped
2010-01-17 03:00:56 +05:30
Pratik Naik
468cfcedd3
Improve the error message for class mismatch on Relation#merge
2010-01-17 02:08:42 +05:30
Pratik Naik
7f8d4d3c4e
Get rid of Base#merge_includes
2010-01-16 23:59:57 +05:30
Pratik Naik
07e41a8361
No need to set @arel_engine to nil twice. Committed by mistake in 3968825f
2010-01-16 23:17:14 +05:30
Pratik Naik
3968825f5f
Make sure Model#active_relation always adds STI conditions if needed
2010-01-16 23:11:35 +05:30
Pratik Naik
cfdfd89926
Use new finder methods for association preloading
2010-01-16 22:14:10 +05:30
Pratik Naik
f80be3ea0f
Use Relation#apply_finder_options from calculations
2010-01-16 22:05:01 +05:30
Pratik Naik
61e831564a
Add Relation#apply_finder_options for applying old finder options
2010-01-16 21:21:20 +05:30
Pratik Naik
5a52523a80
Rename active_relation_engine -> arel_engine and active_relation_table -> arel_table
2010-01-16 16:02:30 +05:30
Chris Hapgood
717a2941e1
Fix #microseconds conversion and #fast_string_to_time
...
* Use direct integer parsing in #fast_string_to_time to avoid convoluted
conversions and errors due to truncation.
* Use Float#round in #microseconds to avoid truncation errors.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2010-01-16 15:21:36 +13:00
Pratik Naik
81cd11259c
Remove protected method Class#scoped?
2010-01-16 04:38:16 +05:30
Pratik Naik
2d0bc08a7e
Make type_condition return Arel predicate and not a string condition
2010-01-16 04:21:18 +05:30
Pratik Naik
99dd107760
Remove unused default_select
2010-01-16 04:21:18 +05:30
Pratik Naik
2ee130abec
Remove scope related code from construct_join
2010-01-16 03:51:10 +05:30
Pratik Naik
21ce8eac9b
Remove stale construct_* methods
2010-01-16 03:37:04 +05:30
Pratik Naik
951e485b88
Remove construct_conditions
2010-01-16 02:56:13 +05:30
Pratik Naik
6c997c3c39
Simplify Model.delete_all
2010-01-16 02:38:19 +05:30
Pratik Naik
c5f3811a49
Model.delete should just use scoped.delete
2010-01-16 02:35:53 +05:30
Pratik Naik
3da29f647b
Remove AR#scope() method
2010-01-16 01:42:01 +05:30
Pratik Naik
43a84a054f
Fix the query matching in SubscriberTest
2010-01-16 00:02:46 +05:30
Pratik Naik
bed9179aa1
Make scopes use relations under the hood
2010-01-16 00:02:46 +05:30