Sha256: 6188d222bc8015df060fea58722b0cee6c4a22b784e1b04e2fc7269025ab192b
Contents?: true
Size: 544 Bytes
Versions: 35
Compression:
Stored size: 544 Bytes
Contents
require "rails/generators" module Generators module Avo class FilterGenerator < ::Rails::Generators::NamedBase source_root File.expand_path("templates", __dir__) class_option :select, type: :boolean class_option :text, type: :boolean namespace "avo:filter" def create_resource_file type = "boolean" type = "select" if options[:select] type = "text" if options[:text] template "filters/#{type}_filter.tt", "app/avo/filters/#{singular_name}.rb" end end end end
Version data entries
35 entries across 35 versions & 1 rubygems