1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

18 commits

Author SHA1 Message Date
Prem Sichanugrist
ad343d7263 Use Rails 3.1 change method in 'add_' migration generator 2011-01-04 11:16:52 -08:00
Prem Sichanugrist
9e64dfad0d Use Rails 3.1 change method in model generator 2011-01-04 11:16:52 -08:00
Santiago Pastorino
3b9120fa52 Generate add_index by default when giving type belongs_to or references 2010-12-16 20:58:58 -02:00
Aaron Patterson
4d35f8b661 updating generators 2010-11-17 14:57:54 -08:00
Piotr Sarnacki
7acf64a81b Add namespacing for observer generator
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-25 17:28:10 +02:00
Piotr Sarnacki
00aa13bc0e Generators fix: properly check if module should be created when creating a namespaced model
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-25 10:46:22 +02:00
Piotr Sarnacki
bac0826b1f Refactor namespaced generators to use module_namespacing block helper
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-24 21:02:30 +02:00
Piotr Sarnacki
e83634081a Generators are not aware of namespace of isolated engines and applications
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-24 21:02:24 +02:00
Piotr Sarnacki
75f8ac6ea7 Implemented ActiveRecord::Migrations#copy based on James Adam's idea
ActiveRecord::Migration#copy allows to copy migrations from one place
to another, changing migrations versions and adding scope to filename.

For example:
ActiveRecord::Migration.copy("db/migrate",
        :blog_engine => "vendor/gems/blog/db/migrate")

will copy all migrations from vendor/gems/blog/db/migrate to db/migrate
with such format:

Versions of copied migrations will be reversioned to be appended after
migrations that already exists in db/migrate
2010-09-03 22:59:09 +02:00
Jack Dempsey
a79e985923 split out active_record migration logic so others can easily reuse [#5389 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-01 09:57:57 +02:00
Santiago Pastorino
3344c011da Avoid a blank line before the add/remove columns 2010-06-25 15:06:32 -03:00
Łukasz Strzałkowski
518b16d9ae Line break in migration template and nicer code indentation
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-25 10:57:05 +02:00
Mohammed Siddick.E
7008911222 Patch for Namespace problem in Scaffold. [#4763 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-23 09:30:55 +02:00
Steve Abatangle
4515947845 Fix problem with migrations template that can cause bogus code to be created
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 12:32:51 +02:00
José Valim
cde168edbb Update generators to use thor 0.13.6 with simpler source_root handling. 2010-04-30 12:42:12 +02:00
Phil Smith
64373937a3 Make the migration generator handle pre-existing migrations with the same timestamp.
In the event a migration already exists with that number, the new migration's timestamp will be incremented by 1.

[#4412 state:resolved]

Signed-off-by: Michael Koziarski <michael@koziarski.com>
2010-04-19 14:48:31 +12:00
Andrew White
788d923893 Generate module file for namespaced models [#4230 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-12 10:57:27 +02:00
José Valim
b61f6f5980 Load generators from both lib/rails/generators and lib/generators. Using the former since it's less obstrusive. 2010-03-23 13:40:41 +01:00