Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
react-rails-rspec
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aman Sharma
react-rails-rspec
Commits
ebb60b88
Commit
ebb60b88
authored
Oct 01, 2020
by
Vijay Gawariya
Browse files
Options
Browse Files
Download
Plain Diff
resolve conflict
parents
b5e494f7
303b764b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
32 deletions
+0
-32
recipes_controller.rb
app/controllers/api/v1/recipes_controller.rb
+0
-1
NewRecipe.jsx
app/javascript/components/NewRecipe.jsx
+0
-31
No files found.
app/controllers/api/v1/recipes_controller.rb
View file @
ebb60b88
...
@@ -6,7 +6,6 @@ class Api::V1::RecipesController < ApplicationController
...
@@ -6,7 +6,6 @@ class Api::V1::RecipesController < ApplicationController
def
create
def
create
recipe
=
Recipe
.
create!
(
recipe_params
)
recipe
=
Recipe
.
create!
(
recipe_params
)
print
recipe_params
if
recipe
if
recipe
render
json:
recipe
render
json:
recipe
else
else
...
...
app/javascript/components/NewRecipe.jsx
View file @
ebb60b88
...
@@ -93,37 +93,6 @@ class NewRecipe extends React.Component {
...
@@ -93,37 +93,6 @@ class NewRecipe extends React.Component {
.
catch
(
error
=>
console
.
log
(
error
.
message
));
.
catch
(
error
=>
console
.
log
(
error
.
message
));
}
}
// submitFile(event) {
// event.preventDefault();
// const url = "/api/v1/recipes/uploadFile";
// const { file } = this.state;
// if (file.length == 0)
// return;
// const body = { file };
// console.log(body);
// const token = document.querySelector('meta[name="csrf-token"]').content;
// const formData = new FormData()
// formData.append("file", file)
// fetch(url, {
// method: "POST",
// headers: {
// "X-CSRF-Token": token,
// },
// body: formData
// })
// .then(response => {
// if (response.ok) {
// alert("AAAAAAAAAAA")
// // return response.json();
// console.log(response.json);
// }
// throw new Error("Network response was not ok.");
// })
// .catch(error => console.log(error.message));
// }
render
()
{
render
()
{
return
(
return
(
<
div
className=
"container mt-5"
>
<
div
className=
"container mt-5"
>
...
...
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