Class: FlexaLib::LookupGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/flexa_lib/lookup/lookup_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_lookupObject



8
9
10
11
12
# File 'lib/generators/flexa_lib/lookup/lookup_generator.rb', line 8

def generate_lookup
  template "lookup_controller.rb", "app/controllers/lookups/#{plural_file_name}_controller.rb"
  template "lookup_view.erb", "app/views/lookups/#{plural_file_name}/index.html.erb"
  route("match 'lookups/#{plural_file_name}' => 'lookups/#{plural_file_name}#index', :as => :lookups_#{plural_file_name}")
end