Class: Hideable::Generators::MigrationGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/hideable/migration_generator.rb

Instance Method Summary collapse

Instance Method Details

#execObject



7
8
9
10
11
12
# File 'lib/generators/hideable/migration_generator.rb', line 7

def exec
  classes.each do |c|
    table_name = c.constantize.table_name
    generate('migration', "AddHiddenAtTo#{table_name.camelize} hidden_at:datetime")
  end
end