From 7c1f5469a84fed807e59e8281f42d998a203afb3 Mon Sep 17 00:00:00 2001 From: victory-lydia Date: Tue, 18 Oct 2022 23:18:17 +0100 Subject: [PATCH 1/5] I changed lines 10,31 and 41 --- README.md | 1 + app/controllers/csvfiles_controller.rb | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9bfcab5ef0..d06c3051ac 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ We recommend you either work in a virtual environment, or on a dual booted syste 2. [Dual Booting](https://www.tecmint.com/install-ubuntu-alongside-with-windows-dual-boot/amp/), [option2](https://askubuntu.com/questions/1031993/how-to-install-ubuntu-18-04-alongside-windows-10), [video guide](https://www.youtube.com/watch?v=qNeJvujdB-0&fbclid=IwAR0APhs89jlNR_ENKbSwrp6TI6P-wxlx-a0My9XBvPNAfwtADZaAXqcKtP4) 3. [Setting up a Linux virtual env](https://itsfoss.com/install-linux-in-virtualbox/) + ### Windows Subsystem for Linux 2 Installation Before continuing with the installation steps in this README, users of Windows Subsystem for Linux 2 (WSL 2) should open the WSL 2 Terminal and type out the commands below. diff --git a/app/controllers/csvfiles_controller.rb b/app/controllers/csvfiles_controller.rb index d9631ebc22..073604eef9 100644 --- a/app/controllers/csvfiles_controller.rb +++ b/app/controllers/csvfiles_controller.rb @@ -7,7 +7,7 @@ def setter filetitle: params[:filetitle], filedescription: params[:filedescription], filepath: params[:object], - filename: "file" + Time.now.to_i.to_s, + filename: "file #{Time.now.to_i}", filestring: params[:filestring] ) render json: @csvfile if @csvfile.save @@ -28,7 +28,7 @@ def add_graphobject filetitle: params[:filetitle], filedescription: params[:filedescription], filepath: params[:object], - filename: "file" + Time.now.to_i.to_s, + filename: "file #{Time.now.to_i}", filestring: params[:filestring], graphobject: params[:graphobject] ) @@ -38,6 +38,7 @@ def add_graphobject def delete return unless params[:id] && params[:uid].to_i == current_user.uid + file = Csvfile.where(id: params[:id].to_i) if file.destroy(params[:id].to_i) flash[:notice] = "Deleted the file" From c5231ee1bd2bd54d3f3ff84b43202247829d1eec Mon Sep 17 00:00:00 2001 From: victory-lydia Date: Wed, 19 Oct 2022 14:08:02 +0100 Subject: [PATCH 2/5] Changed lines 10 and 31 --- app/controllers/csvfiles_controller.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/csvfiles_controller.rb b/app/controllers/csvfiles_controller.rb index 073604eef9..35f044f6d8 100644 --- a/app/controllers/csvfiles_controller.rb +++ b/app/controllers/csvfiles_controller.rb @@ -38,7 +38,6 @@ def add_graphobject def delete return unless params[:id] && params[:uid].to_i == current_user.uid - file = Csvfile.where(id: params[:id].to_i) if file.destroy(params[:id].to_i) flash[:notice] = "Deleted the file" From 1b525004a9fbb1cd4f535652f00783788b6abc97 Mon Sep 17 00:00:00 2001 From: victory-lydia <81695564+victory-lydia@users.noreply.github.com> Date: Thu, 20 Oct 2022 09:16:14 +0100 Subject: [PATCH 3/5] Update app/controllers/csvfiles_controller.rb Co-authored-by: Tilda Udufo --- app/controllers/csvfiles_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/csvfiles_controller.rb b/app/controllers/csvfiles_controller.rb index 35f044f6d8..7abbeb289f 100644 --- a/app/controllers/csvfiles_controller.rb +++ b/app/controllers/csvfiles_controller.rb @@ -28,7 +28,7 @@ def add_graphobject filetitle: params[:filetitle], filedescription: params[:filedescription], filepath: params[:object], - filename: "file #{Time.now.to_i}", + filename: "file#{Time.now.to_i}", filestring: params[:filestring], graphobject: params[:graphobject] ) From cdc290add3e4bb86e5ac42f18dc8d1249c9c7d1b Mon Sep 17 00:00:00 2001 From: victory-lydia <81695564+victory-lydia@users.noreply.github.com> Date: Thu, 20 Oct 2022 09:19:05 +0100 Subject: [PATCH 4/5] Update app/controllers/csvfiles_controller.rb Co-authored-by: Tilda Udufo --- app/controllers/csvfiles_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/csvfiles_controller.rb b/app/controllers/csvfiles_controller.rb index 7abbeb289f..c43510011b 100644 --- a/app/controllers/csvfiles_controller.rb +++ b/app/controllers/csvfiles_controller.rb @@ -7,7 +7,7 @@ def setter filetitle: params[:filetitle], filedescription: params[:filedescription], filepath: params[:object], - filename: "file #{Time.now.to_i}", + filename: "file#{Time.now.to_i}", filestring: params[:filestring] ) render json: @csvfile if @csvfile.save From c1ef2382045fa653a83fce92ea26c85afc505f72 Mon Sep 17 00:00:00 2001 From: Tilda Udufo Date: Thu, 20 Oct 2022 14:17:03 +0100 Subject: [PATCH 5/5] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index d06c3051ac..9bfcab5ef0 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,6 @@ We recommend you either work in a virtual environment, or on a dual booted syste 2. [Dual Booting](https://www.tecmint.com/install-ubuntu-alongside-with-windows-dual-boot/amp/), [option2](https://askubuntu.com/questions/1031993/how-to-install-ubuntu-18-04-alongside-windows-10), [video guide](https://www.youtube.com/watch?v=qNeJvujdB-0&fbclid=IwAR0APhs89jlNR_ENKbSwrp6TI6P-wxlx-a0My9XBvPNAfwtADZaAXqcKtP4) 3. [Setting up a Linux virtual env](https://itsfoss.com/install-linux-in-virtualbox/) - ### Windows Subsystem for Linux 2 Installation Before continuing with the installation steps in this README, users of Windows Subsystem for Linux 2 (WSL 2) should open the WSL 2 Terminal and type out the commands below.