Sha256: 45a03228d7b87f93d9600530050eb779b603da843940e9385c15313e40520ffb

Contents?: true

Size: 404 Bytes

Versions: 1

Compression:

Stored size: 404 Bytes

Contents

module MegaBar
  class MegaBarFieldsGenerator < Rails::Generators::Base
    source_root File.expand_path('../templates', __FILE__)
    argument :tablename, type: :string
    argument :fieldname, type: :string
    argument :fieldtype, type: :string
    
    def generate_migration
      generate 'migration add_' + fieldname + '_to_' + tablename  + ' ' + fieldname + ':' + fieldtype
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mega_bar-0.0.1 lib/generators/mega_bar/mega_bar_fields/mega_bar_fields_generator.rb