Class: Tableficate::TableGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/tableficate/table/table_generator.rb

Constant Summary collapse

TABLES_PATH =
'app/tables'

Instance Method Summary collapse

Instance Method Details

#create_tableObject



11
12
13
14
15
# File 'lib/generators/tableficate/table/table_generator.rb', line 11

def create_table
  empty_directory(TABLES_PATH)

  template('table.rb', "#{TABLES_PATH}/#{file_name.underscore}.rb")
end