diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 1f9c66c..8970d8b 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -1,5 +1,5 @@
class UsersController < ApplicationController
- before_action :set_user, only: %i[show edit update destroy]
+ before_action :set_user, only: %i[ show edit update destroy ]
# GET /users or /users.json
def index
@@ -58,7 +58,6 @@ def destroy
end
private
-
# Use callbacks to share common setup or constraints between actions.
def set_user
@user = User.find(params[:id])
diff --git a/app/javascript/components/articleCard.js b/app/javascript/components/articleCard.js
index 2a01a78..a1a7834 100644
--- a/app/javascript/components/articleCard.js
+++ b/app/javascript/components/articleCard.js
@@ -49,6 +49,7 @@ const ArticleCard = ({ id, title, body, thumbnail, onShowClick, creator }) => (
{body}
+
by {creator}
{
axios
.get('/articles')
.then((response) => {
+ console.log('here');
+ console.log(response.data);
setArticles(response.data);
})
.catch((response) => console.log(response));
diff --git a/db/seeds.rb b/db/seeds.rb
index 1e7b3ef..ed37491 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -28,13 +28,13 @@
User.destroy_all
User.create!([{
- username: "user#1"
- },
- {
- username: "user#2"
- },
- {
- username: "user#3"
- }])
+ username: "user#1"
+ },
+ {
+ username: "user#2"
+ },
+ {
+ username: "user#3"
+ }])
Rails.logger.debug { "Created #{User.count} Users." }
diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb
index 1ea8674..c2d855d 100644
--- a/test/controllers/users_controller_test.rb
+++ b/test/controllers/users_controller_test.rb
@@ -7,13 +7,11 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
test "should get index" do
get users_url
-
assert_response :success
end
test "should get new" do
get new_user_url
-
assert_response :success
end
@@ -27,19 +25,16 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
test "should show user" do
get user_url(@user)
-
assert_response :success
end
test "should get edit" do
get edit_user_url(@user)
-
assert_response :success
end
test "should update user" do
patch user_url(@user), params: { user: { username: @user.username } }
-
assert_redirected_to user_url(@user)
end
diff --git a/test/system/users_test.rb b/test/system/users_test.rb
index e4ec922..ea8907d 100644
--- a/test/system/users_test.rb
+++ b/test/system/users_test.rb
@@ -7,7 +7,6 @@ class UsersTest < ApplicationSystemTestCase
test "visiting the index" do
visit users_url
-
assert_selector "h1", text: "Users"
end