Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VenShop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Dao Minh Nhut
VenShop
Commits
b6d73d1a
Commit
b6d73d1a
authored
Jul 23, 2015
by
Dao Minh Nhut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix import product
parent
f56eb516
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
config/routes.rb
+0
-3
lib/tasks/amazon.rb
+1
-1
lib/tasks/import_product.rake
+3
-3
No files found.
config/routes.rb
View file @
b6d73d1a
...
...
@@ -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'
...
...
lib/tasks/amazon.rb
View file @
b6d73d1a
...
...
@@ -11,7 +11,7 @@ class Amazon
@item_pages
=
(
1
..
10
).
to_a
end
p
rivate
p
ublic
def
import_product
(
item
)
begin
...
...
lib/tasks/import.rake
→
lib/tasks/import
_product
.rake
View file @
b6d73d1a
namespace
:products
do
namespace
:products
do
desc
'Get products'
task
import: :environment
do
Amazon
.
new
.
import
Amazon
.
new
.
import_product
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment