diff options
| author | luu <luuduong@gmail.com> | 2014-12-13 16:10:39 +0000 |
|---|---|---|
| committer | luu <luuduong@gmail.com> | 2014-12-13 16:10:39 +0000 |
| commit | 0a61f5240d1fa127a9bb9bdd0a39ffd84dc8bfb9 (patch) | |
| tree | 8e5aa23ce3e1995e3ad495595494448427077756 /app/controllers/admin | |
| parent | b4f69d56586c42310c3e2738714cf0e1aea7309f (diff) | |
create a new tool.
Diffstat (limited to 'app/controllers/admin')
| -rw-r--r-- | app/controllers/admin/products_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/admin/products_controller.rb b/app/controllers/admin/products_controller.rb index 28c3c55e..0c4eb32d 100644 --- a/app/controllers/admin/products_controller.rb +++ b/app/controllers/admin/products_controller.rb @@ -12,5 +12,10 @@ module Admin def show @product = @product_api.find(params[:id]) end + + def create + Tool.create(:name=>params[:name],:asin=>params[:asin]) + redirect_to admin_products_path(params[:asin]) + end end end |
