Class: Generators::Avo::FilterGenerator
- Inherits:
-
NamedBaseGenerator
- Object
- Rails::Generators::NamedBase
- NamedBaseGenerator
- Generators::Avo::FilterGenerator
- Defined in:
- lib/generators/avo/filter_generator.rb
Instance Method Summary collapse
Methods inherited from NamedBaseGenerator
Constructor Details
This class inherits a constructor from Generators::Avo::NamedBaseGenerator
Instance Method Details
#create_resource_file ⇒ Object
12 13 14 15 16 |
# File 'lib/generators/avo/filter_generator.rb', line 12 def create_resource_file raise "Invalid filter type '#{[:type]}'" unless filter_types.include? [:type] template "filters/#{[:type]}_filter.tt", "app/avo/filters/#{singular_name}.rb" end |