Class: HasMedia::Generators::ViewsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/has_media/views_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_viewsObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/generators/has_media/views_generator.rb', line 10

def copy_views
  case options[:template_engine].to_s
  when "haml"
    verify_haml_existence
    verify_haml_version
    create_and_copy_haml_views
  else
    directory "has_media", "app/views/has_media"
  end
end