Sha256: af1ac9c54454d08c6ff0c72378739ecc5dbfa47f13ab707a8269898f08e63dc9
Contents?: true
Size: 452 Bytes
Versions: 11
Compression:
Stored size: 452 Bytes
Contents
# frozen_string_literal: true module Phlex module Generators class ViewGenerator < ::Rails::Generators::NamedBase source_root File.expand_path("templates", __dir__) def create_view @layout = layout @path = File.join("app/views", class_path, "#{file_name}.rb") template "view.rb.erb", @path end private def layout ::Rails.root.join("app/views/layout.rb").exist? end # hook_for :test_framework end end end
Version data entries
11 entries across 11 versions & 1 rubygems