Sha256: a72af0e4f536d88fccdac30d5dbf264232ca0bed6d551d586dcde9b05d022a83

Contents?: true

Size: 557 Bytes

Versions: 4

Compression:

Stored size: 557 Bytes

Contents

require "#{ File.dirname(__FILE__) }/lib/route_tiny_cms.rb"

class TinyCmsGenerator < Rails::Generator::NamedBase

  def manifest
    record do |m|
      m.directory "app/models/#{class_path}"
      m.template 'model.rb', "app/models/#{file_path}.rb"
      
      m.directory "app/controllers/#{class_path}"
      m.template 'model.rb', "app/controllers/#{plural_name}_controller.rb"
      
      m.migration_template 'migration.rb', 'db/migrate', :migration_file_name => "tiny_cms_create_#{table_name}"
      m.route_tiny_cms table_name
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tiny_cms-0.2.1 generators/tiny_cms/tiny_cms_generator.rb
tiny_cms-0.2.0 generators/tiny_cms/tiny_cms_generator.rb
tiny_cms-0.1.1 generators/tiny_cms/tiny_cms_generator.rb
tiny_cms-0.1.0 generators/tiny_cms/tiny_cms_generator.rb