Sha256: 5a990cd553d30e46874060c62278214acd56e51c9d2c4081d72150a2903c4f20

Contents?: true

Size: 521 Bytes

Versions: 5

Compression:

Stored size: 521 Bytes

Contents

class Petrie::InstallGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)

  def copy_models
    copy_file 'pages_controller.rb', 'app/controllers/pages_controller.rb'
  end

  def copy_views
    copy_file 'home.html.erb', 'app/views/pages/home.html.erb'
    copy_file 'show.html.erb', 'app/views/pages/show.html.erb'
  end

  def copy_controllers
    copy_file 'page.rb', 'app/models/page.rb'
  end

  def install_migrations
    rake "petrie_engine:install:migrations"
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
petrie-0.1.4 lib/generators/petrie/install/install_generator.rb
petrie-0.1.3 lib/generators/petrie/install/install_generator.rb
petrie-0.1.2 lib/generators/petrie/install/install_generator.rb
petrie-0.1.1 lib/generators/petrie/install/install_generator.rb
petrie-0.1.0 lib/generators/petrie/install/install_generator.rb