Commit Graph

12007 Commits

Author SHA1 Message Date
Jeremy Kemper
485d244eae Merge branch 'master' of github.com:rails/rails 2009-12-29 15:38:17 -08:00
José Valim
0b37572552 Clean up railties Rakefile from old responsibilities which are now part of main Rakefile 2009-12-29 23:58:44 +01:00
José Valim
1a4d909c68 Add rails app --edge and rails app --dev 2009-12-29 23:58:34 +01:00
José Valim
66604b2e0e Add default respond_to formats to ApplicationController. 2009-12-29 23:58:25 +01:00
Sam Pohlenz
468bdb3ed8 Make plugins responsible for loading their own rake tasks
Signed-off-by: Carl Lerche <carllerche@mac.com>
2009-12-29 14:47:48 -08:00
Sam Pohlenz
cbce027669 Application object should instantiate non-vendored plugins
Signed-off-by: Carl Lerche <carllerche@mac.com>
2009-12-29 14:45:43 -08:00
Carl Lerche
2e87196d14 Use extlib_inheritable_accessor in request_forgery_protection.rb.
For some reason the current class_inheritable_accessor does not play nice with included hooks. class_inheritable_accessor will be revised shortly.
2009-12-29 13:21:36 -08:00
Carl Lerche
3cb7e04763 Finally remove rails/initializer.rb 2009-12-29 13:20:10 -08:00
Pratik Naik
f17bb1fbff Simplify get_projection_name_from_chained_relations using recursion 2009-12-30 01:16:24 +05:30
Emilio Tagua
00cd3789f6 Relation#count should look for projections in chained relations and perform the count on the given column
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-12-30 01:12:38 +05:30
Carl Lerche
aa1b32ae97 Check to see if the plugin object responds to load_tasks (vendor/plugin/* does not yet) Fixes Sam Ruby's tests. 2009-12-29 10:49:12 -08:00
Pratik Naik
0dea509817 Oops, add the missing #tap call 2009-12-29 15:54:40 +05:30
Pratik Naik
3b8853eda4 Replace Base#safe_to_array with Array.wrap 2009-12-29 15:53:06 +05:30
Pratik Naik
0a1ff1a14f Rewrite Relation#readonly, eager_load, preload using Object#tap 2009-12-29 15:28:40 +05:30
Pratik Naik
1785e1b26e Rename Relation#create_new_relation to spawn and refactor preload/eagerload associations using attr_writer 2009-12-29 15:24:30 +05:30
Pratik Naik
61fa111a55 Refactor Relation#readonly using attr_writer 2009-12-29 15:24:30 +05:30
Yehuda Katz
cf4978313b Make sure evalled method knows where it came from 2009-12-29 01:04:32 -08:00
Pratik Naik
981f696398 Relation#respond_to? should take second argument for responding to private methods 2009-12-29 12:31:08 +05:30
Pratik Naik
bc933d0fa1 Make sure Relation responds to dynamic finder methods 2009-12-29 12:27:40 +05:30
Pratik Naik
f290e685f0 Add Relation#size and Relation#empty? 2009-12-29 12:15:28 +05:30
Pratik Naik
13989ff8c6 Use relation#delete_all for Model.delete_all 2009-12-29 11:46:07 +05:30
Pratik Naik
54b80c7361 Add Relation#delete_all 2009-12-29 11:46:07 +05:30
Jeremy Kemper
f79caa49fb Complain if there's no such middleware 2009-12-28 20:24:28 -08:00
Carl Lerche
4ee70643b3 Don't require initializer.rb in core.rb 2009-12-28 18:26:15 -08:00
Carl Lerche
49c800b6bd Move the ActiveRecord related rake tasks into the AR gem. 2009-12-28 17:53:05 -08:00
Carl Lerche
d747b6847b Require active_support/dependencies/autoload in action_dispatch 2009-12-28 17:53:05 -08:00
Carl Lerche
c02f278263 Add the ability to have plugins load rake tasks. 2009-12-28 17:53:04 -08:00
Jeremy Kemper
9a650a6547 Silence some trivial warnings: shadowed local vars, indentation mismatches 2009-12-28 17:36:08 -08:00
José Valim
6d390671f6 Move ActiveRecord callbacks implementation to ActiveModel and make use of it.
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
2009-12-28 16:19:23 -08:00
Yehuda Katz
643862e3be Merge branch 'master' of github.com:rails/rails 2009-12-28 16:19:09 -08:00
Pratik Naik
078ea0dfbd Oops. Remove debug information inside a test from the previous commit 2009-12-29 04:33:37 +05:30
Pratik Naik
08633bae5e Migrate all the calculation methods to Relation 2009-12-29 04:30:04 +05:30
Jeremy Kemper
949c8c0d0e Don't publicize with_scope for tests since it may shadow public misuse 2009-12-28 14:07:23 -08:00
Jeremy Kemper
1b91f534ce Fix uniqueness validation: with_exclusive_scope is not public 2009-12-28 14:06:22 -08:00
Jeremy Kemper
d927265abd Fix pg test 2009-12-28 13:05:36 -08:00
Jeremy Kemper
9fe42232f1 Merge commit 'Fingertips/master' 2009-12-28 12:50:56 -08:00
Jeremy Kemper
a76af2309a rake smoke: toplevel task to quickly smoke-test all projects 2009-12-28 12:29:03 -08:00
Pratik Naik
1ebfd999ec Add ruby-debug to Gemfile for Ruby < 1.9 2009-12-29 01:53:15 +05:30
Jeremy Kemper
ea7b5ff99e Use present rather than any 2009-12-28 12:12:53 -08:00
Eloy Duran
c23fbd0d47 Refactored previous changes to nested attributes. 2009-12-28 21:09:22 +01:00
Michael Siebert
07b615fb89 Add an :update_only option to accepts_nested_attributes_for for to-one associations. [#2563 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-12-28 21:09:19 +01:00
Jeremy Kemper
f95fcdd3af Fix copy/pasted test class name 2009-12-28 11:40:34 -08:00
Jeremy Kemper
4691cc43ee Fix ruby version test 2009-12-28 11:40:23 -08:00
Jeremy Kemper
632df063a3 Merge commit 'josevalim/validations' 2009-12-28 11:13:35 -08:00
Pratik Naik
91e28aae86 Add Model.having and Relation#having 2009-12-29 00:07:46 +05:30
Eloy Duran
9c771a9608 Make sure to not add autosave callbacks multiple times. [#3575 state:resolved]
This makes sure that, in a HABTM association, only one join record is craeted.
2009-12-28 16:56:31 +01:00
Murray Steele
ff508640e2 Make polymorphic_inverse_of in Reflection throw an InverseOfAssociationNotFoundError if the supplied class doesn't have the appropriate association. [#3520 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-12-28 15:12:17 +01:00
Murray Steele
6a74ee7f4d Provide a slightly more robust we_can_set_the_inverse_on_this? method for polymorphic belongs_to associations. [#3520 state:resolved]
Also add a new test for polymorphic belongs_to that test direct accessor assignment, not just .replace assignment.

Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-12-28 15:12:15 +01:00
George Ogata
81ca0cf2b0 Add inverse polymorphic association support. [#3520 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-12-28 15:12:13 +01:00
Murray Steele
6c8c85bc1e Add more tests for the various ways we can assign objects to associations. [#3513 state:resolved]
Get rid of a duplicate set_inverse_instance call if you use new_record(true) (e.g. you want to replace the existing instance).

Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-12-28 15:12:11 +01:00