Class: Generators::Avo::ActionGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/avo/action_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_resource_fileObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/generators/avo/action_generator.rb', line 11

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