7
8
9
10
11
12
13
14
15
|
# File 'lib/generators/simple_hashtag/views_generator.rb', line 7
def generate_views
copy_file "views/hashtags_controller.rb", "app/controllers/hashtags_controller.rb"
copy_file "views/hashtags_helper.rb", "app/helpers/hashtags_helper.rb"
copy_file "views/hashtags_index.html.erb", "app/views/hashtags/index.html.erb"
copy_file "views/hashtags_show.html.erb", "app/views/hashtags/show.html.erb"
route 'get "hashtags", to: "hashtags#index", as: :hashtags'
route 'get "hashtags/:hashtag", to: "hashtags#show", as: :hashtag'
end
|