Commit b6d73d1a by Dao Minh Nhut

fix import product

parent f56eb516
......@@ -8,9 +8,6 @@ VenShop::Application.routes.draw do
get '/help', to: 'static_pages#help'
get '/about', to: 'static_pages#about'
get '/contact', to: 'static_pages#contact'
get '/signup', to: 'users#new'
get '/signin', to: 'sessions#new'
# match '/signout', to: 'sessions#destroy', via: :delete
# match '/categories/:id', to: 'categories#show'
# match '/items/:id', to: 'items#show'
# match '/user/add_to_cart/:id', to: 'users#add_to_cart'
......
......@@ -11,7 +11,7 @@ class Amazon
@item_pages = (1..10).to_a
end
private
public
def import_product(item)
begin
......@@ -44,5 +44,5 @@ class Amazon
end
end
end
end
\ No newline at end of file
namespace :products do
desc 'Get products'
task import: :environment do
Amazon.new.import
namespace :products do
desc 'Get products'
task import: :environment do
Amazon.new.import_product
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment