Sha256: a91f1ec34c8ceb8b79ef478ba8f0ce4a0fe57c48239aa98b2a9ca2c2e83782ff
Contents?: true
Size: 529 Bytes
Versions: 10
Compression:
Stored size: 529 Bytes
Contents
class CarterInstallGenerator < Rails::Generator::Base default_options :skip_migration => false def copy_controller_file copy_file "cart_items_controller.rb", "app/controllers" copy_file "carts_controller.rb", "app/controllers" end def copy_view_file copy_file "carts/show.html.erb", "app/views/carts" 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
Version data entries
10 entries across 10 versions & 1 rubygems