Class: Tellimus::ViewsGenerator

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

Instance Method Summary collapse

Instance Method Details

#installObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/generators/tellimus/views_generator.rb', line 19

def install

  # all entries in app/views/tellimus/subscriptions without . and ..
  # ==> all FILES in the directory
  files_to_copy = Dir.entries("#{Tellimus::Engine.root}/app/views/tellimus/subscriptions") - %w[. ..]
  files_to_copy.each do |file|
    copy_file file, "app/views/tellimus/subscriptions/#{file}"
  end

end