Sha256: 72a57179cdbb9ef07292e5b89b31804a706834e9640e49198f88ce522f7e07ba
Contents?: true
Size: 782 Bytes
Versions: 2
Compression:
Stored size: 782 Bytes
Contents
require 'rails/generators/base' module Carter module Generators class InstallGenerator < Rails::Generators::Base source_root File.expand_path('../../../../', __FILE__) def copy_controller_file copy_file "app/controllers/cart_items_controller.rb", "app/controllers/cart_items_controller.rb" copy_file "app/controllers/carts_controller.rb", "app/controllers/carts_controller.rb" end def copy_view_file copy_file "app/views/carts/show.html.erb", "app/views/carts/show.html.erb" end protected def add_options!(opt) opt.separator '' opt.separator 'Options:' opt.on("--skip-migration", "Don't generate a migration") { |v| options[:skip_migration] = v } end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
carter-0.8.1 | lib/generators/carter/install_generator.rb |
carter-0.8.0 | lib/generators/carter/install_generator.rb |