From dc3440f6b33e7e4194726d4518f45e4e139bb225 Mon Sep 17 00:00:00 2001
From: root
Date: Sun, 17 May 2026 17:41:08 +0000
Subject: [PATCH] fixing timestamps if uckin hope
---
app/controllers/posts_controller.rb | 2 +-
app/views/posts/index.html.erb | 2 +-
app/views/scraps/index.html.erb | 7 +++----
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb
index 6010014..bff0767 100644
--- a/app/controllers/posts_controller.rb
+++ b/app/controllers/posts_controller.rb
@@ -5,7 +5,7 @@ class PostsController < ApplicationController
def index
@posts = Post.all.order(created_at: :desc)
- @post = Post.find_by(params[:id])
+# @post = Post.find_by(params[:id])
end
def show
diff --git a/app/views/posts/index.html.erb b/app/views/posts/index.html.erb
index 5582267..52f8944 100644
--- a/app/views/posts/index.html.erb
+++ b/app/views/posts/index.html.erb
@@ -16,7 +16,7 @@
<%= image_tag post.icon_image %>
<% else %>
🛸
- <% end %> <%= time_ago_in_words(@post.created_at) %> ago
<% if authenticated? %>
+ <% end %> <%= time_ago_in_words(post.created_at) %> ago <% if authenticated? %>
|
<%= link_to 'Edit', edit_post_path(post) %>
<%= link_to 'Destroy', post_path(post), data: {
diff --git a/app/views/scraps/index.html.erb b/app/views/scraps/index.html.erb
index 8b71688..cb3e84e 100644
--- a/app/views/scraps/index.html.erb
+++ b/app/views/scraps/index.html.erb
@@ -9,11 +9,10 @@ random thoughts longer than miniblog length will go here :)
<% @scraps.each do |scrap| %>
-(<%= link_to 'Read', scrap_path(scrap) %>)
-
- <%= truncate(scrap.text.to_plain_text, length: 350) %> | <%= time_ago_in_words(scrap.created_at) %> ago
+(<%= link_to 'Read', scrap_path(scrap) %>)
| | <%= time_ago_in_words(scrap.created_at) %> ago
-<% if authenticated? %>
+
+ <%= truncate(scrap.text.to_plain_text, length: 350) %> <% if authenticated? %>
|
<%= link_to 'Edit', edit_scrap_path(scrap) %>
<%= link_to 'Destroy', scrap_path(scrap), data: {