diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-09-19 18:47:41 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-20 10:41:12 +0200 |
commit | dfac9b1404d78d1abb793431bb034a2cc78ce270 (patch) | |
tree | fef108cce00ab861afc9d46cb2b0bc1e824736a9 /railties | |
parent | d475de7e2573847bf4b13c291618053f30070a21 (diff) | |
download | rails-dfac9b1404d78d1abb793431bb034a2cc78ce270.tar.gz rails-dfac9b1404d78d1abb793431bb034a2cc78ce270.tar.bz2 rails-dfac9b1404d78d1abb793431bb034a2cc78ce270.zip |
Strengthen documantation on engine's migrations and seed data
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/engine.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 8387f277c9..fd91185a47 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -257,6 +257,21 @@ module Rails # # This code will use my_engine.user_path(@user) to generate proper route. # + # == Migrations & seed data + # + # Engines can have their own migrations. Default path for migrations is exactly the same + # as in application: db/migrate + # + # To use engine's migrations in application you can use rake task, which copies them to + # application's dir: + # + # rake railties:copy_migrations + # + # If your engine has migrations, you may also want to prepare data for the database in + # seeds.rb file. You can load that data using load_seed method, e.g. + # + # MyEngine::Engine.load_seed + # class Engine < Railtie autoload :Configurable, "rails/engine/configurable" autoload :Configuration, "rails/engine/configuration" |