Commit Graph

11938 Commits

Author SHA1 Message Date
Pratik Naik
a3c1db4e44 Add Model.lock and relation#lock now that arel has locking 2009-12-28 12:42:06 +05:30
David Heinemeier Hansson
1c47d04ea5 Added Object#presence that returns the object if it's #present? otherwise returns nil [DHH/Colin Kelley] 2009-12-27 17:54:43 -08:00
David Heinemeier Hansson
a642edbef3 Added default .gitignore (this is just recognizing Git market share, don't throw a hissy if you use another SCM) [DHH] 2009-12-27 17:48:11 -08:00
Yehuda Katz
f095e6f59d Fixes some problems with getting a new app working 2009-12-27 16:00:34 -08:00
Jeremy Kemper
19c48281a7 String#exclude? core extension: inverse of #include? 2009-12-27 15:49:29 -08:00
Jeremy Kemper
7c4fb93ac3 Ruby 1.9: string is not enumerable, so #exclude? is not available 2009-12-27 15:38:00 -08:00
Jeremy Kemper
3a79117c77 Typo 2009-12-27 15:27:18 -08:00
David Heinemeier Hansson
ebe3c8f2e4 Merge branch 'master' of github.com:rails/rails 2009-12-27 15:23:38 -08:00
David Heinemeier Hansson
438a8c3ec7 Require the enumberable extension from active support because we use #exclude? 2009-12-27 15:23:30 -08:00
José Valim
a176263ebc Fix generators tests.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-12-27 15:19:16 -08:00
Jeremy Kemper
292363c75f Use i18n 2009-12-27 15:17:44 -08:00
David Heinemeier Hansson
5012a1558d Merge branch 'master' of github.com:rails/rails 2009-12-27 14:44:21 -08:00
David Heinemeier Hansson
1cd949006a Fix the i18n dependency problem 2009-12-27 14:43:06 -08:00
Yehuda Katz
12e43494a7 Merge remote branch 'jose/perf' 2009-12-27 14:36:59 -08:00
Pratik Naik
1c26ba486c Add Model.from and association_collection#from finder methods 2009-12-28 03:59:44 +05:30
Pratik Naik
6a776dcc9d Use relation.from when constructing a relation 2009-12-28 03:59:44 +05:30
David Heinemeier Hansson
9521fcbcc2 Merge branch 'master' of github.com:rails/rails 2009-12-27 14:14:54 -08:00
David Heinemeier Hansson
95762cbbb3 Added shorthand for match 'products/overview' that expands to match 'products/overview', :to => 'products#overview', :as => 'products_overview' 2009-12-27 14:13:03 -08:00
Pratik Naik
a0ff5f82c3 Dont delegate relation#find to to_a 2009-12-28 03:22:33 +05:30
Pratik Naik
e9e20ab601 Use arel#from instead of the current hack 2009-12-28 03:19:31 +05:30
Pratik Naik
630dc50730 Fix relation tests for postgres 2009-12-28 02:50:04 +05:30
Pratik Naik
51a1d5a670 Handle preloads and eager loads when merging relations 2009-12-28 01:33:20 +05:30
Pratik Naik
a8b10a2a8d Add relation#merge to merge two relations 2009-12-28 01:08:34 +05:30
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
José Valim
97db79ab3c Remove ActiveRecord runtime logging from ActionPack and place in ActiveRecord, adding it through config.action_controller.include hook. 2009-12-27 13:32:40 +01:00
José Valim
7e8b7f46bf Add config.action_controller.include behavior to plugins. 2009-12-27 13:31:36 +01:00
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
José Valim
75ba102a80 Remove ActionView inline logging to ActiveSupport::Notifications and create ActionController::Base#log_event, so everything can be logged within one listener. Also expose log_process_action as a hook for different modules to include their own information during the action processing. This allow ActiveRecord to hook and any other ORM. Finally, this commit changes 'Processing' and 'Rendering' in logs to 'Processed' and 'Rendered' because at the point it's logged, everying already happened. 2009-12-26 20:28:53 +01:00