Class: Generators::Avo::ActionGenerator

Inherits:
NamedBaseGenerator show all
Defined in:
lib/generators/avo/action_generator.rb

Instance Method Summary collapse

Methods inherited from NamedBaseGenerator

#initialize

Constructor Details

This class inherits a constructor from Generators::Avo::NamedBaseGenerator

Instance Method Details

#configuration_optionsObject



17
18
19
20
21
22
# File 'lib/generators/avo/action_generator.rb', line 17

def configuration_options
  configuration = "  self.name = \"#{options[:name] || name.titleize}\""
  configuration += "\n  self.standalone = true" if options[:standalone]

  configuration
end

#create_resource_fileObject



13
14
15
# File 'lib/generators/avo/action_generator.rb', line 13

def create_resource_file
  template "action.tt", "app/avo/actions/#{singular_name}.rb"
end