Pratik Naik
08312e9958
Return a new relation when blank is supplied to relation.joins
2009-12-27 23:29:41 +05:30
Pratik Naik
5565bab994
Rewrite AssociationCollection#find using relations
2009-12-27 22:32:20 +05:30
Pratik Naik
bbdeaae2ca
Add relation.destroy_all
2009-12-27 21:15:12 +05:30
Pratik Naik
5cd8818258
Make Model.destroy_all use new finders
2009-12-27 19:22:18 +05:30
Pratik Naik
352cc7c94a
Make Model.find(:last) use relations
2009-12-27 19:12:50 +05:30
Pratik Naik
d5e98dc859
Add relation.last and relation.reverse_order
2009-12-27 19:04:30 +05:30
Pratik Naik
8957f5db5d
Make Model.all just a wrapper for find(:all)
2009-12-27 18:32:10 +05:30
Pratik Naik
d6d0fe8c8f
Make Model.find(:first, ..) use relations
2009-12-27 18:28:59 +05:30
Pratik Naik
59cf5e7bf2
Make Model.exists? use relation.exists?
2009-12-27 18:10:26 +05:30
Pratik Naik
2c8f83556b
Add relation.exists?
2009-12-27 18:00:49 +05:30
Pratik Naik
b31233485b
Make Model.find(:all) use relations
2009-12-27 17:43:31 +05:30
Pratik Naik
a3f3fab795
Add relation.from as a temporary workaround until arel relation has .from option
2009-12-27 17:37:36 +05:30
Pratik Naik
6f5e3a04d6
Relation should supply :from to find_with_associations
2009-12-27 17:16:20 +05:30
Pratik Naik
7b5d0e8b78
Make Model.find(ids) use relations
2009-12-27 16:56:10 +05:30
Pratik Naik
d92c4a8402
Add find(ids) to relations
2009-12-27 16:15:29 +05:30
Pratik Naik
81608cf8fa
Make Model.all return an array rather than a relation for consistency. Use Model.scoped to get a relation
2009-12-27 15:06:45 +05:30
Pratik Naik
1efc8edb5f
Fix dynamic finder docs
2009-12-27 14:50:33 +05:30
Pratik Naik
85770ec713
Make Model.find_or_create_by_* and find_or_initialize_by_* use relations and remove method caching
2009-12-27 14:46:38 +05:30
Pratik Naik
d511de0261
Add find_or_create_by_* and find_or_initialize_by_* to relations
2009-12-27 14:28:19 +05:30
Pratik Naik
8829d6ecc6
Make Model.find_by_* and Model.find_all_by_* use relations and remove dynamic method caching
2009-12-27 13:17:29 +05:30
Jeremy Kemper
51d84eff12
Require bundled environment, if present, so Active Support can load i18n
2009-12-26 22:22:48 -08:00
Joshua Peek
bdf8ee44c5
script/server should init Rails by loading config.ru
...
Fixes "Rails 3.0 doesn't fucking work"
2009-12-26 18:23:48 -06:00
Pratik Naik
f6f416c58e
Add find_by_* and find_all_by_* finders to ActiveRecord::Relation
2009-12-27 03:25:29 +05:30
Pratik Naik
cc753eaf58
Replace Model.first(options) with new finder methods inside tests
2009-12-27 01:50:03 +05:30
Joshua Peek
feb7382047
AD::Cascade that supports X-Cascade
2009-12-26 13:28:06 -06:00
Joshua Peek
673fa7f066
rack-mount 0.4
2009-12-26 13:25:36 -06:00
Joshua Peek
f53c36350d
Expect Rack 1.1
2009-12-26 13:25:35 -06:00
Pratik Naik
83f24afd44
Add new finder methods to association collection.
2009-12-27 00:25:00 +05:30
Pratik Naik
f374150698
Ensure Model.scoped adds type conditions for STI models
2009-12-27 00:11:31 +05:30
Pratik Naik
c6258ee313
Ensure all the finder methods respect scoping
2009-12-26 19:15:05 +05:30
Pratik Naik
9a9f97af28
Add relation.reload to force reloading the records
2009-12-26 15:31:50 +05:30
Pratik Naik
3c5a7dcaf5
Cache the loaded relations
2009-12-26 15:07:00 +05:30
Pratik Naik
9d3d60c64a
Ensure preload and eager_load finder methods accept multiple arguments
2009-12-26 14:40:45 +05:30
Pratik Naik
284d186cf4
Make sure the relations are always immutable
2009-12-26 14:26:02 +05:30
Pratik Naik
187fbe5cba
Add support for multiple arguments to .where finder
2009-12-26 12:57:34 +05:30
Pratik Naik
5f5aa44d2d
Add missing changelog entries
2009-12-26 12:43:49 +05:30
Pratik Naik
feb8b20eb5
Add Relation#all as an alias for to_a
2009-12-26 12:39:44 +05:30
Pratik Naik
a73fa9356f
Stop supporting blank arguments to AR#relation query methods
2009-12-26 04:07:50 +05:30
Pratik Naik
95274b28d9
Rename Model.conditions and relation.conditions to .where
2009-12-26 03:50:57 +05:30
Pratik Naik
1a99337180
No parentheses for assert_equal
2009-12-26 03:10:55 +05:30
Pratik Naik
a7fd564ab1
Add Model.select/group/order/limit/joins/conditions/preload/eager_load class methods returning a lazy relation.
...
Examples :
posts = Post.select('id).order('name') # Returns a lazy relation
posts.each {|p| puts p.id } # Fires "select id from posts order by name"
2009-12-26 03:06:51 +05:30
Yehuda Katz
8f6da9483b
Merge remote branch 'jose/am'
2009-12-25 13:06:11 -08:00
José Valim
9f1c359a20
Fix whiny_nil tests, improve error messages and make CI happy.
2009-12-25 22:00:36 +01:00
José Valim
88ba056043
Refactor multiple parts logic and move Utils to PartContainer.
2009-12-25 21:47:47 +01:00
José Valim
ee70d1b6ad
adv_attr_accessors in ActionMailer are not sent to the views, use the mailer object if you need to access the subject, recipients, from, etc.
2009-12-25 21:35:40 +01:00
Pratik Naik
2e79ec71a5
Model.scoped now returns a relation if invoked without any arguments
...
Example :
posts = Post.scoped
posts.size # Fires "select count(*) from posts" and returns the count
posts.each {|p| puts p.name } # Fires "select * from posts" and loads post objects
2009-12-26 01:33:20 +05:30
David Heinemeier Hansson
7f5d44bac5
The controller key shouldnt be part of the mapping if its not used
2009-12-25 10:14:44 -08:00
David Heinemeier Hansson
a8f1ee5986
Fix tests
2009-12-25 10:04:26 -08:00
José Valim
135d32c8bd
Move i18n to Gemfile.
2009-12-25 15:15:13 +01:00
José Valim
eb8e627c69
Merge branch 'master' of git://github.com/rails/rails
2009-12-25 12:09:13 +01:00