Class: FlexaLib::CocoonViewGenerator

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

Instance Method Summary collapse

Constructor Details

#initialize(args, *options) ⇒ CocoonViewGenerator

Returns a new instance of CocoonViewGenerator.



9
10
11
12
13
# File 'lib/generators/flexa_lib/cocoon_view/cocoon_view_generator.rb', line 9

def initialize(args, *options)
  
  super(args, *options)
  initialize_views_variables
end

Instance Method Details

#generate_lookupObject



15
16
17
# File 'lib/generators/flexa_lib/cocoon_view/cocoon_view_generator.rb', line 15

def generate_lookup
  template "cocoon_view.erb", File.join('app/views', @controller_file_path, "_#{nested.singularize.underscore}_fields.html.erb")
end