Class: MakeCommentable::Generators::ViewsGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_javascriptsObject



12
13
14
# File 'lib/generators/make_commentable/views_generator.rb', line 12

def create_javascripts
  template "javascripts/comments.js", "app/assets/javascripts/comments/comments.js"
end

#create_viewsObject



7
8
9
10
# File 'lib/generators/make_commentable/views_generator.rb', line 7

def create_views
  template "views/_comment.html.haml", "app/views/comments/_comment.html.haml"
  template "views/_comment_form.html.haml", "app/views/comments/_comment_form.html.haml"
end