File: install_generator.rb

package info (click to toggle)
ruby-noticed 3.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 324 kB
  • sloc: ruby: 1,186; makefile: 4
file content (19 lines) | stat: -rw-r--r-- 437 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Noticed
  module Generators
    class ModelGenerator < Rails::Generators::Base
      include Rails::Generators::ResourceHelpers

      source_root File.expand_path("../templates", __FILE__)

      def create_migrations
        rails_command "railties:install:migrations FROM=noticed", inline: true
      end

      def done
        readme "README" if behavior == :invoke
      end
    end
  end
end