Sha256: 464cdc9a0d9a471b13114efef8df8a0f8cf2cf804ec470545cc8b224b6ce6cfd

Contents?: true

Size: 569 Bytes

Versions: 6

Compression:

Stored size: 569 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.migration_template 'migration.rb', 'db/migrate', :migration_file_name => "tiny_cms_create_#{table_name}"
      
      m.directory "app/controllers/#{class_path}"
      m.template 'controller.rb', "app/controllers/#{plural_name}_controller.rb"
      
      m.route_tiny_cms table_name
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tiny_cms-0.2.10 generators/tiny_cms/tiny_cms_generator.rb
tiny_cms-0.2.8 generators/tiny_cms/tiny_cms_generator.rb
tiny_cms-0.2.6 generators/tiny_cms/tiny_cms_generator.rb
tiny_cms-0.2.5 generators/tiny_cms/tiny_cms_generator.rb
tiny_cms-0.2.4 generators/tiny_cms/tiny_cms_generator.rb
tiny_cms-0.2.3 generators/tiny_cms/tiny_cms_generator.rb