Sha256: 1220ba51a7f6c0cfc947a1b2f2547bd333fbf17866815a0adfb2cd8a5b6c34f0
Contents?: true
Size: 750 Bytes
Versions: 49
Compression:
Stored size: 750 Bytes
Contents
require_relative "named_base_generator" require_relative "concerns/parent_controller" require_relative "concerns/override_controller" module Generators module Avo class ControllerGenerator < NamedBaseGenerator include Concerns::ParentController include Concerns::OverrideController source_root File.expand_path("templates", __dir__) namespace "avo:controller" def create return if override_controller? template "resource/controller.tt", "app/controllers/avo/#{controller_name}.rb" end private def controller_name "#{plural_name}_controller" end def controller_class "Avo::#{class_name.camelize.pluralize}Controller" end end end end
Version data entries
49 entries across 49 versions & 1 rubygems