Class: DiscussionGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/discussion/discussion_generator.rb

Instance Method Summary collapse

Instance Method Details

#viewsObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/generators/discussion/discussion_generator.rb', line 9

def views
  files = [
      'threads/show.html.erb',
      'threads/_index.html.erb',
      'threads/_form.html.erb',
      'threads/_list.html.erb',
      'threads/_view.html.erb',

      'comments/_form.html.erb',
      'comments/_list_with_form.html.erb',
      'comments/_view.html.erb',
  ]

  files.each do |file|
    copy_file file, "app/views/discussion/#{file}"
  end
end