0.0
No commit activity in last 3 years
No release in over 3 years
A seed upgrade plugin for Rails3.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 2.0.0.beta2
~> 3.0
 Project Readme

#SeedUpgrade

SeedUpgrade is a seed upgrade plugin for Rails3.

##Supported versions

  • Ruby 1.8.7, 1.9.2, 1.9.3

  • Rails 3.0.x, 3.1

##Installation

In your app's Gemfile, add:

gem "seed_upgrade", :group => [:development]

Then run:

> bundle
> rails generate seed_upgrade:install

##Uninstallation

Run:

> rails destroy seed_upgrade:install

##Usage Example

When your generate post model, then hook invoke, create db/seeds/post.rb file

> rails g model post title:string
    invoke  active_record
    create    db/migrate/20111117151257_create_posts.rb
    create    app/models/post.rb
    invoke    test_unit
    create      test/unit/post_test.rb
    create      test/fixtures/posts.yml
    invoke  seed_upgrade
    create    db/seeds/post.rb

If your models has been created, you want generate model seed,very easy also, run

> rails g seed_upgrade:revise_model
    create  db/seeds/post.rb
    create  db/seeds/post_test.rb
    create  db/seeds/user.rb

Then run the following command, the rake is in lib/tasks/application.rake, it auto load db/seeds/post.rb

> bundle exec rake app:dev:reload

##Copyright

Copyright (c) 2011 vkill.net .