Commit 30fa2ca2 authored by Chanelle Lunod's avatar Chanelle Lunod

Initial commit

parent bbd58e73
...@@ -6,10 +6,7 @@ class TransactionsController < ApplicationController ...@@ -6,10 +6,7 @@ class TransactionsController < ApplicationController
end end
def display def display
if @product.status == active @product = Product.find_by(id: params[:id])
Products.find_by(id: [pramas[:id])
else
#dont display
end end
def new def new
......
...@@ -5,9 +5,6 @@ Rails.application.routes.draw do ...@@ -5,9 +5,6 @@ Rails.application.routes.draw do
resources :products resources :products
root to: 'products#index', as: :authenticated_admin_user_root root to: 'products#index', as: :authenticated_admin_user_root
end end
unauthenticated :admin_user do
root to: 'publics#index', as: :unauthenticated_admin_user_root
end
end end
devise_for :users devise_for :users
...@@ -19,9 +16,6 @@ Rails.application.routes.draw do ...@@ -19,9 +16,6 @@ Rails.application.routes.draw do
end end
root to: 'transactions#index', as: :authenticated_user_root root to: 'transactions#index', as: :authenticated_user_root
end end
unauthenticated :user do
root to: 'publics#index', as: :unauthenticated_user_root
end
end end
root to: 'publics#index' root to: 'publics#index'
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