Class: Terrazzo::Generators::Views::FieldGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/terrazzo/views/field_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_field_templatesObject



15
16
17
18
19
20
21
22
# File 'lib/generators/terrazzo/views/field_generator.rb', line 15

def copy_field_templates
  if field_type == "all"
    directory "fields", "app/views/#{namespace_name}/fields"
  else
    directory "fields/shared", "app/views/#{namespace_name}/fields/shared"
    directory "fields/#{field_type}", "app/views/#{namespace_name}/fields/#{field_type}"
  end
end