Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

Model generator doesn't honor --skip option

#6144

When trying to provide the --skip option to rails generate model it fails if the about to be generated migration already exists instead of just skipping it. Demonstration:

> rails -v
Rails 3.0.3
> rails new test_generator     
> cd test_generator     
> rails generate model post   

> rails generate model post --skip
      invoke  active_record
Another migration is already named create_posts: /srv/samba/share/test_generator/db/migrate/20101210161949_create_posts.rb

Reported by Evgeniy Dolzhenko · December 10th, 2010 @ 04:24 PM

State: resolved
Milestone: 3.1
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Piotr Sarnacki
    Piotr Sarnacki
    • Milestone set to 3.1
    • Assigned user set to José Valim
    • Importance changed from to Low

    I attached patch for that. It works on master, I think that it's not important to backport it on stable, as this is minor bug.

    December 10th, 2010 @ 10:05 PM

  2. Piotr Sarnacki
  3. Piotr Sarnacki
    Piotr Sarnacki
    • Tag changed from generators to generators, patch

    December 11th, 2010 @ 09:55 AM

  4. Repository
    Repository
    • State changed from new to resolved

    (from [307443972c5f6de959a5401eec76ca327484b10c]) Skip creating migration if --skip option is passed to model generator [#6144 Model generator doesn't honor --skip option state:resolved]

    Signed-off-by: José Valim jose.valim@gmail.com
    https://github.com/rails/rails/commit/307443972c5f6de959a5401eec76c...

    December 11th, 2010 @ 10:42 AM

  5. Repository