Sha256: 1af04761aa4b924ef9cbc769b1ee019c08d7db995d774a21016dda4504d95236
Contents?: true
Size: 462 Bytes
Versions: 4
Compression:
Stored size: 462 Bytes
Contents
require "rails/generators" require "generators/scenic/view/view_generator" module Scenic module Generators class ModelGenerator < Rails::Generators::NamedBase source_root File.expand_path("../templates", __FILE__) check_class_collision def create_model_file template("model.erb", "app/models/#{file_name}.rb") end def invoke_view_generator invoke "scenic:view", [singular_name] end end end end
Version data entries
4 entries across 4 versions & 1 rubygems