diff --git a/app/assets/javascripts/ListViewPage.js b/app/assets/javascripts/ListViewPage.js index d9fbc12528dd44936e55065750627802bdfc7caf..2b138da6c5f60827d5020eb936fd725d1200dffb 100644 --- a/app/assets/javascripts/ListViewPage.js +++ b/app/assets/javascripts/ListViewPage.js @@ -67,6 +67,6 @@ function updateProduct(field, id, col){ } if(!timer){ - timer = setTimeout(performUpdate, 5000); + timer = setTimeout(performUpdate, 2000); } } \ No newline at end of file diff --git a/app/controllers/lists_controller.rb b/app/controllers/lists_controller.rb deleted file mode 100644 index bec3a24ac7336fb851ce01ea0729e978fff5d3a3..0000000000000000000000000000000000000000 --- a/app/controllers/lists_controller.rb +++ /dev/null @@ -1,75 +0,0 @@ -class ListsController < ApplicationController - before_action :set_list, only: [:show, :edit, :update, :destroy] - - # GET /lists - # GET /lists.json - def index - @lists = List.all - end - - # GET /lists/1 - # GET /lists/1.json - def show - end - - # GET /lists/new - def new - @list = List.new - end - - # GET /lists/1/edit - def edit - end - - # POST /lists - # POST /lists.json - def create - @list = List.new(list_params) - - respond_to do |format| - if @list.save - format.html { redirect_to @list, notice: 'List was successfully created.' } - format.json { render :show, status: :created, location: @list } - else - format.html { render :new } - format.json { render json: @list.errors, status: :unprocessable_entity } - end - end - end - - # PATCH/PUT /lists/1 - # PATCH/PUT /lists/1.json - def update - respond_to do |format| - if @list.update(list_params) - format.html { redirect_to @list, notice: 'List was successfully updated.' } - format.json { render :show, status: :ok, location: @list } - else - format.html { render :edit } - format.json { render json: @list.errors, status: :unprocessable_entity } - end - end - end - - # DELETE /lists/1 - # DELETE /lists/1.json - def destroy - @list.destroy - respond_to do |format| - format.html { redirect_to lists_url, notice: 'List was successfully destroyed.' } - format.json { head :no_content } - end - end - - private - - # Use callbacks to share common setup or constraints between actions. - def set_list - @list = List.find(params[:id]) - end - - # Only allow a list of trusted parameters through. - def list_params - params.require(:list).permit(:name, :user_id) - end -end \ No newline at end of file diff --git a/app/controllers/products_controller.rb b/app/controllers/products_controller.rb deleted file mode 100644 index 290e647fce188495a49cf21392bdbb7aece1f3b6..0000000000000000000000000000000000000000 --- a/app/controllers/products_controller.rb +++ /dev/null @@ -1,74 +0,0 @@ -class ProductsController < ApplicationController - before_action :set_product, only: [:show, :edit, :update, :destroy] - - # GET /products - # GET /products.json - def index - @products = Product.all - end - - # GET /products/1 - # GET /products/1.json - def show; end - - # GET /products/new - def new - @product = Product.new - end - - # GET /products/1/edit - def edit; end - - # POST /products - # POST /products.json - def create - @product = Product.new(product_params) - - respond_to do |format| - if @product.save - format.html { redirect_to @product, notice: 'Product was successfully created.' } - format.json { render :show, status: :created, location: @product } - else - format.html { render :new } - format.json { render json: @product.errors, status: :unprocessable_entity } - end - end - end - - # PATCH/PUT /products/1 - # PATCH/PUT /products/1.json - def update - - respond_to do |format| - if @product.update(product_params) - format.html { redirect_to @product, notice: 'Product was successfully updated.' } - format.json { render :show, status: :ok, location: @product } - else - format.html { render :edit } - format.json { render json: @product.errors, status: :unprocessable_entity } - end - end - end - - # DELETE /products/1 - # DELETE /products/1.json - def destroy - @product.destroy - respond_to do |format| - format.html { redirect_to products_url, notice: 'Product was successfully destroyed.' } - format.json { head :no_content } - end - end - - private - - # Use callbacks to share common setup or constraints between actions. - def set_product - @product = Product.find(params[:id]) - end - - # Only allow a list of trusted parameters through. - def product_params - params.require(:product).permit(:name, :quantity, :acquired, :list_id) - end -end \ No newline at end of file diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb deleted file mode 100644 index 7743dd7067ac069a0b68a44f62677b7767f17b73..0000000000000000000000000000000000000000 --- a/app/controllers/users_controller.rb +++ /dev/null @@ -1,76 +0,0 @@ -class UsersController < ApplicationController - before_action :set_user, only: [:show, :edit, :update, :destroy] - - # GET /users - # GET /users.json - def index - @users = User.all - end - - # GET /users/1 - # GET /users/1.json - def show - end - - # GET /users/new - def new - @user = User.new - end - - # GET /users/1/edit - def edit - end - - # POST /users - # POST /users.json - def create - @user = User.new(user_params) - - respond_to do |format| - if @user.save - format.html { redirect_to @user, notice: 'User was successfully created.' } - format.json { render :show, status: :created, location: @user } - else - format.html { render :new } - format.json { render json: @user.errors, status: :unprocessable_entity } - end - end - end - - # PATCH/PUT /users/1 - # PATCH/PUT /users/1.json - def update - respond_to do |format| - if @user.update(user_params) - format.html { redirect_to @user, notice: 'User was successfully updated.' } - format.json { render :show, status: :ok, location: @user } - else - format.html { render :edit } - format.json { render json: @user.errors, status: :unprocessable_entity } - end - end - end - - # DELETE /users/1 - # DELETE /users/1.json - def destroy - @user.destroy - respond_to do |format| - format.html { redirect_to users_url, notice: 'User was successfully destroyed.' } - format.json { head :no_content } - end - end - - # Only allow a list of trusted parameters through. - def user_params - params.require(:user).permit(:name, :email, :password) - end - - private - # Use callbacks to share common setup or constraints between actions. - def set_user - @user = User.find(params[:id]) - end - - -end