Commit Graph

27124 Commits

Author SHA1 Message Date
Vishnu Atrai
8fbb44787e remove more conditions for Fiber available in ruby19 2011-12-31 01:22:40 +05:30
José Valim
7c55d6977c Merge pull request #4235 from castlerock/remove_ruby_18_BasicObject
ruby 1.8 ActiveSupport BasicObject no longer available
2011-12-30 10:59:14 -08:00
José Valim
50f1743286 Merge pull request #4236 from castlerock/to_time_available_in_ruby19_DateTime
remove condition since to_time always available in ruby19 DateTime
2011-12-30 10:58:35 -08:00
Vishnu Atrai
7249f94e6c remove condition since to_time always available in ruby19 DateTime 2011-12-31 00:15:21 +05:30
Vishnu Atrai
e734f001d3 ruby 1.8 ActiveSupport BasicObject no longer available 2011-12-30 23:45:57 +05:30
Aaron Patterson
5681f79f64 be explicit about where helpers are installed 2011-12-30 10:02:49 -08:00
Aaron Patterson
116b9edf95 Merge pull request #4224 from alexeymuranov/my-fix-for-fixture-tables
Fix #2572 and define fixture table name in the associated model
2011-12-30 10:02:19 -08:00
José Valim
4b99732552 Merge pull request #4233 from bogdan/remove_define_runner
AS::Callbacks: remove __define_runner
2011-12-30 04:43:45 -08:00
Xavier Noria
9fa59ca208 adds a comments that clarifies why Range#include? chooses the comparison operator 2011-12-30 02:18:07 -08:00
Xavier Noria
edfe7d8013 Merge pull request #4229 from lest/range-include
refactor Range#include? to handle ranges with floats
2011-12-30 02:13:37 -08:00
Alexey Muranov
b52d9d0ff5 Fixes for TestFixtures::setup_fixture_accessors
Renamed "fixture_name" to "accessor_name" and made fixture names in the form "admin/users" be used as the key for the hashes @fixture_cache and @loaded_fixtures.

Previously the variable "fixture_name" here was getting a value of the form "admin_user", and this value was then used as the hash key.
2011-12-30 10:34:02 +01:00
Alexey Muranov
7162ea2a0c Fixture's table name be defined in the model
Made the fixture's table name be taken from its model class whenever this class responds to table_name, instead of inferring it sometimes from the fixture's pass.

The previous behavior seemed buggy because it depended on whether the model class was passed as a constant or as a name string.

Improved Fixtures#initialize.
2011-12-30 10:34:02 +01:00
Alexey Muranov
d3e6e7e484 Test case: fixture table name is defined in model 2011-12-30 10:34:02 +01:00
Alexey Muranov
e0ef093619 Use foo/bar instead of foo_bar keys for fixtures
This solves an issue with set_fixture_class class method caused by create_fixtures method's overwriting passed to it fixture model classes, when the fixtures are "namespased": foo/bar or admin/users.

The idea is to use "foo/bar" string as the name and identifier of a
fixture file bar in directory foo.  The model class of the fixture is either set with set_fixture_class method, or otherwise inferred from its name using camelize method.

Also a bug is fixed in lines 487-489 when the table names were guessed by substitution from the fixture file names, ambiguously called  table_names, instead of being taken from fixture attributes.  Now they are taken from attributes.

I plan to submit another fix so that the fixture's table name (for
example foo_bar) be defined by the fixture's model whenever possible,
instead of inferring it from the fixture's name ("foo/bar").
2011-12-30 10:34:01 +01:00
Alexey Muranov
6468ff4197 Test fixtures with custom model and table names
Test using fixtures with random names and model names, that is not following naming conventions but using set_fixture_class instead.

It is expected that the table name be defined in the model, but this is not explicitly tested here.  This will need to be fixed.
2011-12-30 10:34:01 +01:00
Bogdan Gusiev
2a78886a1d AS::Callbacks: remove __define_runner 2011-12-30 10:53:46 +02:00
Aaron Patterson
e43b2b35c7 just add the writer rather than adding both and removing one 2011-12-29 16:07:07 -08:00
Aaron Patterson
87dd62ab2e stop using __send__ and just module eval in the extensions 2011-12-29 14:38:02 -08:00
Aaron Patterson
cd97d0b5b7 we know the classes will be a list, so *tell* it to respond to each
rather than casting
2011-12-29 14:38:01 -08:00
Aaron Patterson
fb3e09a877 don't need the begin / end 2011-12-29 14:38:01 -08:00
Aaron Patterson
72c290ca15 avoid extra method calls by just defining the delegate 2011-12-29 14:38:01 -08:00
José Valim
5ac0273cba Merge pull request #4226 from grentis/content_for_with_flush
content_for with flush parameter
2011-12-29 13:11:11 -08:00
grentis
8a130edb0f content_for with flush parameter 2011-12-29 21:59:55 +01:00
Aaron Patterson
0035c54e2f don't use instance eval, just reference variables so we don't have to
worry about "inspect" marshalling
2011-12-29 10:25:58 -08:00
Vijay Dev
04d308a03b Merge branch 'master' of github.com:lifo/docrails 2011-12-29 23:35:45 +05:30
Aaron Patterson
88aeeee288 removing dead code. 2011-12-29 09:52:18 -08:00
Vijay Dev
1fc6036b4b revise some doc changes 2011-12-29 22:58:57 +05:30
Aaron Patterson
c0904e47f2 decouple initialize from clear!. Initialize ivars in initialize, clear
ivars in clear!
2011-12-29 09:06:34 -08:00
Aaron Patterson
25b10f4c1c modules don't have any instance methods 2011-12-29 09:02:54 -08:00
Jon Leighton
c99d507fcc Deprecate implicit eager loading. Closes #950. 2011-12-29 14:27:33 +00:00
José Valim
0b8b68209d Merge pull request #4231 from nashby/remove-constantize-ruby-18
remove ruby 1.8 checking in constantize method
2011-12-29 06:00:29 -08:00
Vasiliy Ermolovich
6e5ab54b60 remove ruby 1.8 checking in constantize method 2011-12-29 16:01:10 +03:00
José Valim
65ff9a19ac Merge pull request #4230 from alovak/patch-1
Fix rails/generators/base.rb documentation for hook_for
2011-12-29 03:43:17 -08:00
Pavel Gabriel
73f0588fd3 Fix rails/generators/base.rb documentation for hook_for 2011-12-29 13:33:01 +02:00
Sergey Nartimov
952e9d9005 refactor Range#include? to handle ranges with floats 2011-12-29 13:26:52 +03:00
Aaron Patterson
afd9512c0b simplify sweep now that discard and flashes are in sync 2011-12-28 18:39:39 -08:00
Aaron Patterson
bdfd11e6da mutations on the underlying hash should also mutate the discard set 2011-12-28 18:33:44 -08:00
Aaron Patterson
dea160266f rename @used to something a bit more meaningful 2011-12-28 18:25:36 -08:00
Aaron Patterson
ffad4927b1 mutations can't be done without the consent of our proxy object. This
is one benefit of choosing composition over inheritance.
2011-12-28 18:21:35 -08:00
Aaron Patterson
21df2bfc4a again, use Set#subtract 2011-12-28 17:39:51 -08:00
Aaron Patterson
ea35967524 Use Set#subtract and Set#merge for keeping track of used / unused keys 2011-12-28 17:35:45 -08:00
Aaron Patterson
b88a181b7f fix method visibility 2011-12-28 17:22:37 -08:00
Aaron Patterson
77df5ba0a1 no need for bang bang 💣 2011-12-28 17:14:22 -08:00
Aaron Patterson
780a222dc2 Merge pull request #4216 from edgecase/master_fix_reorder_with_limited_ids
allow reorder to affect eager loading correctly
2011-12-28 17:03:37 -08:00
Jon Leighton
f06074f365 Fix CI 2011-12-28 23:08:40 +00:00
Xavier Noria
e99987bc30 app code in general wants Time.current, not Time.now 2011-12-28 23:47:10 +01:00
Aaron Patterson
0b61e3f86a Merge pull request #4222 from amatsuda/ar_predicate_builder_refactor
refactor AR::PredicateBuilder.build_from_hash
2011-12-28 11:42:29 -08:00
Kevin Moore
a7d3851bdb Documented about using :path option for resources 2011-12-28 10:59:28 -08:00
Jon Leighton
2fb5d0a3fc Merge pull request #4221 from tonycoco/master
Rails template creation issue
2011-12-28 10:47:10 -08:00
Jon Leighton
88d2af5be4 Delete some stray lines 2011-12-28 18:44:15 +00:00