Sha256: c23a0043930b28938b8082d5796bea3c607c96f762a6bd8ad35f66d660a7e324
Contents?: true
Size: 1.02 KB
Versions: 164
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true require 'generators/slim/scaffold/scaffold_generator' class PgSlimGenerator < Slim::Generators::ScaffoldGenerator source_root File.expand_path('templates', __dir__) class_option :paranoia, type: :boolean, default: false, desc: 'Paranoid y deleted_at.' class_option :discard, type: :boolean, default: false, desc: 'Discard y discarded_at.' class_option :trackeo_de_usuarios, type: :boolean, default: true, desc: 'Genera campos creado_por y actualizado_por.' class_option :download_file, type: :boolean, default: false, desc: 'Archivo de download' class_option :index_file, type: :boolean, default: false, desc: 'Archivo de index' def copiar_download return unless options[:download_file] template 'download.xlsx.axlsx', File.join('app', 'views', controller_file_path, 'download.xlsx.axlsx') end protected def available_views if options[:index_file] %w[index show _form] else %w[show _form] end end end
Version data entries
164 entries across 164 versions & 1 rubygems