Commit Graph

4925 Commits

Author SHA1 Message Date
Aaron Patterson
4dec00a9d8 manager will always be a manager 2010-12-10 11:38:43 -08:00
Aaron Patterson
82944b95a9 eliminate lasgns 2010-12-10 11:38:42 -08:00
Aaron Patterson
88bc49f2f7 dealing with an AST manager, not a relation, so fix the variable names 2010-12-10 11:38:42 -08:00
Piotr Sarnacki
3d01ef6dd1 require core_ext/array/wrap in active_record/migration
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-10 08:33:48 +01:00
Aaron Patterson
06ba9eaa62 move join creation a little closer to where it is used 2010-12-09 15:54:07 -08:00
Aaron Patterson
12f67a7069 use inject rather than lasgn 2010-12-09 15:31:09 -08:00
Aaron Patterson
3e7c351b48 preheating cache so that tests can run in isolation 2010-12-09 15:12:48 -08:00
Aaron Patterson
0e8280b193 reuse the superclass methods for shorter codes 2010-12-09 13:48:37 -08:00
Aaron Patterson
b2a042570c just use core methods 2010-12-09 13:48:37 -08:00
Aaron Patterson
d1387a9942 Merge remote branch 'rude/disable-keys-for-postgres-9.0.1' into pg
* rude/disable-keys-for-postgres-9.0.1:
  Cleaner way to extract the Postgres version
  Fix Bug: disable_referential_integrity doesn't work for postgres 9.0.1
2010-12-09 11:19:25 -08:00
Aaron Patterson
6110b0c54d fixing documentation, thanks Ivan Evtuhovich 2010-12-09 11:14:54 -08:00
Aaron Patterson
3cbf5d9794 removing useless lasgn 2010-12-09 11:13:00 -08:00
Robert Pankowecki (Gavdi)
bba3dacc3d Simplifies observer implementation [#6065 state:resolved] 2010-12-09 10:41:43 -08:00
Piotr Sarnacki
e12810178c Use Array.wrap instead of using ternary
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-09 18:50:49 +01:00
Piotr Sarnacki
6f8958277b Fix test on finding migrations from 2 paths
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-09 18:50:44 +01:00
José Valim
cc48192248 Merge remote branch 'drogus/dummy_tasks'
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-09 16:09:51 +01:00
Piotr Sarnacki
7b9f634e15 Refactor db:load:config to automatically pick additional migrations if ENGINE_PATH is available 2010-12-09 14:19:32 +01:00
Mike Dvorkin
f572a02b94 Take into account current time zone when serializing datetime values [#6096 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-09 09:01:49 +01:00
Aaron Patterson
07b0e59988 use sort_by 2010-12-08 17:31:20 -08:00
Piotr Sarnacki
5df72a238e Rake tasks for managing database while development and testing of engines
Some of the engines needs database. As engine needs to be run inside
Rails application, migrations and other database operations are run
from dummy application. To make that process simple I changed db
tasks to look for migrations in both engine's and application's
db/migrate directory. You can run all of the database tasks from
test/dummy or directly from engine with prefix app, like:

  rake app:db:migrate
  rake app:db:migrate:redo
2010-12-09 01:59:54 +01:00
Aditya Sanghi
7a237d56aa Ensure that boolean false is properly serialized [#6079 state:resolved] 2010-12-08 15:51:47 -08:00
Aaron Patterson
285f456391 updating CHANGELOG 2010-12-08 15:38:39 -08:00
Aaron Patterson
6c5b734e6a removing method to prevent warnings 2010-12-08 15:37:13 -08:00
Jeff Dean
7ecee054a3 Setting the id of a belongs_to object updates all referenced objects [#2989 state:resolved] 2010-12-08 15:21:18 -08:00
Piotr Sarnacki
23ba7e456d properly load database config in database rake tasks, to properly set migrations_paths 2010-12-09 00:04:36 +01:00
Piotr Sarnacki
c9d23214ae Allow to run migrations from more than one directory in rake tasks 2010-12-09 00:04:36 +01:00
Piotr Sarnacki
d0467e08e5 Allow to run migrations from more than one directory 2010-12-09 00:04:36 +01:00
Aaron Patterson
e924814b28 just allocate the table in initialize 2010-12-08 14:14:14 -08:00
Aaron Patterson
45ea60eee7 fewer method calls, fewer code branches 2010-12-08 12:11:43 -08:00
Aaron Patterson
c69bd59a9c only call active_record once 2010-12-08 12:09:00 -08:00
Aaron Patterson
dcc0c9a8bb dry up calls to table_aliases 2010-12-08 12:05:02 -08:00
Aaron Patterson
de4bd472c3 remove code that could never be executed 2010-12-08 11:54:45 -08:00
Aaron Patterson
b8d57a0400 have table_aliases call count_aliases to set the default value 2010-12-08 11:50:16 -08:00
Aaron Patterson
f4223cc7ab arel ignores the columns parameter 2010-12-08 11:18:26 -08:00
Aaron Patterson
17d72dd19f adding a fixme comment 2010-12-08 11:02:15 -08:00
Aaron Patterson
3499f882cc renaming variables, making the join_ast method private 2010-12-08 10:54:24 -08:00
Aaron Patterson
ddd6dee043 further reducing dependence on custom_joins 2010-12-08 10:35:26 -08:00
Aaron Patterson
2fd385d471 reducing use of custom joins 2010-12-08 10:29:52 -08:00
Aaron Patterson
1d96d44da3 passing the ast to a table when the relation is a table 2010-12-07 18:54:04 -08:00
Aaron Patterson
d98cb5153d JoinDependency is always created with an AST now 2010-12-07 17:05:15 -08:00
Aaron Patterson
2d9d6cd4c2 passing the ast to JoinDependency 2010-12-07 16:48:59 -08:00
Aaron Patterson
d6133209ce arel is lazy about column information, so no need to pass it around 2010-12-07 15:25:16 -08:00
Aaron Patterson
ddbd203961 reduce string objects, reduce method calls 2010-12-07 15:25:16 -08:00
Aaron Patterson
ef79658bd1 save the AR reference rather than delegating 2010-12-07 14:47:21 -08:00
Aaron Patterson
70ab450274 cleaning up custom_join_sql method 2010-12-07 14:01:37 -08:00
Santiago Pastorino
20ba81e47d We can use the keys of the @attributes hash here and avoid a method call 2010-12-05 12:44:17 -02:00
Santiago Pastorino
c4809d9984 use map instead of each 2010-12-05 12:44:14 -02:00
Santiago Pastorino
a11ddf3ee2 Fix indentation here 2010-12-04 17:50:02 -02:00
Santiago Pastorino
3e84255942 attributes_before_type_cast are just the value of @attributes 2010-12-04 17:49:37 -02:00
Aaron Patterson
a299fcaef9 not a responsibility for rails to test 2010-12-03 16:22:42 -08:00