Sha256: 64668fa64ca21dbaeec97600f5b2be544a8c61e1d37f4501eaa9bcd81af134bf

Contents?: true

Size: 1.25 KB

Versions: 18

Compression:

Stored size: 1.25 KB

Contents

require File.expand_path(File.dirname(__FILE__) + "/lib/insert_commands.rb")

class HeadstartAdminGenerator < Rails::Generator::Base

  def manifest
    record do |m|
      m.directory File.join("app", "controllers", "admin")
      m.file "app/controllers/admin/admin_controller.rb", "app/controllers/admin/admin_controller.rb"
      m.file "app/controllers/admin/users_controller.rb", "app/controllers/admin/users_controller.rb"

      m.directory File.join("app", "views", "admin", "users")
      m.directory File.join("app", "views", "admin", "admin")
      ["app/views/admin/users/_form.html.erb",
       "app/views/admin/users/edit.html.erb",
       "app/views/admin/users/index.html.erb",
       "app/views/admin/users/new.html.erb",
       "app/views/admin/admin/index.html.erb",
       "app/views/admin/_admin_header.html.erb",
       "app/views/admin/users/show.html.erb"].each do |file|
        m.file file, file
      end
      
      m.directory File.join("test", "integration", "admin")
      m.file "test/integration/admin/users_test.rb", "test/integration/admin/users_test.rb"      

      m.insert_into "config/routes.rb",
                    "map.namespace :admin do |admin|\n    admin.resources :users\n  end"
      
      m.readme "README"
    end
  end
  
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
headstart-0.11.2 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.11.1 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.9.2 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.9.1 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.9.0 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.8.0 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.7.0 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.6.2 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.6.1 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.6.0 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.5.5 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.5.4 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.5.3 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.5.2 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.5.1 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.5.0 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.4.2 generators/headstart_admin/headstart_admin_generator.rb
headstart-0.4.1 generators/headstart_admin/headstart_admin_generator.rb