Sha256: 13c35d134b1c98a3d4455b24fd3ad104e396b0d7aab505adbe714fa14a0106ea
Contents?: true
Size: 598 Bytes
Versions: 114
Compression:
Stored size: 598 Bytes
Contents
require "rails/generators" module Generators module Avo class ActionGenerator < Rails::Generators::NamedBase source_root File.expand_path("templates", __dir__) class_option :standalone, type: :boolean namespace "avo:action" def create_resource_file type = "resource" type = "standalone" if options[:standalone] if type == "standalone" template "standalone_action.tt", "app/avo/actions/#{singular_name}.rb" else template "action.tt", "app/avo/actions/#{singular_name}.rb" end end end end end
Version data entries
114 entries across 114 versions & 1 rubygems