Sha256: 095abc16b6d2d06d1e9b5a752676ce17c316c9b76128af1847931be25761914e
Contents?: true
Size: 759 Bytes
Versions: 10
Compression:
Stored size: 759 Bytes
Contents
require "rails/generators" module Ahoy module Generators class ClicksGenerator < Rails::Generators::Base def copy_templates activerecord = defined?(ActiveRecord) mongoid = defined?(Mongoid) selection = if activerecord && mongoid puts <<-MSG Which data store would you like to use? 1. Active Record (default) 2. Mongoid MSG ask(">") elsif activerecord "1" else "2" end case selection when "", "1" invoke "ahoy:clicks:activerecord" when "2" invoke "ahoy:clicks:mongoid" else abort "Error: must enter a number [1-2]" end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems