Sha256: dfe740c788340f8d293cedf9ecc4f5b20caa39bef1f2c9e76f1b0c221e8bb25c
Contents?: true
Size: 559 Bytes
Versions: 2
Compression:
Stored size: 559 Bytes
Contents
# frozen_string_literal: true require 'rails/generators' module HasStates class InstallGenerator < Rails::Generators::Base source_root File.expand_path('templates', __dir__) def install puts 'Installing HasStates...' template( 'create_has_states_states.rb.erb', "db/migrate/#{Time.now.utc.strftime('%Y%m%d%H%M%S')}_create_has_states_states.rb" ) template( 'initializer.rb.erb', 'config/initializers/has_states.rb' ) puts 'HasStates installed successfully!' end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
stateful_models-0.0.2 | lib/generators/has_states/install/install_generator.rb |
stateful_models-0.0.1 | lib/generators/has_states/install/install_generator.rb |