Sha256: c477bc9f263961eea96d787f3879f6c56c6cfa655a9e7eb194267838a52ab443
Contents?: true
Size: 483 Bytes
Versions: 3
Compression:
Stored size: 483 Bytes
Contents
# frozen_string_literal class BaseControllerGenerator < Rails::Generators::NamedBase source_root File.expand_path('templates', __dir__) check_class_collision suffix: "Controller" desc "This generator creates a base controller for the named namespace" def ensure_file template "base_controller.rb.erb", File.join("app", "controllers", file_name, "base_controller.rb") end private def namespace_module file_name.camelize end end
Version data entries
3 entries across 3 versions & 1 rubygems