fixing timestamps if uckin hope
This commit is contained in:
parent
19179d2dfb
commit
dc3440f6b3
3 changed files with 5 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<%= image_tag post.icon_image %>
|
||||
<% else %>
|
||||
🛸
|
||||
<% end %> <%= time_ago_in_words(@post.created_at) %> ago</p> <% if authenticated? %>
|
||||
<% end %> <%= time_ago_in_words(post.created_at) %> ago</p> <% if authenticated? %>
|
||||
|
|
||||
<%= link_to 'Edit', edit_post_path(post) %>
|
||||
<%= link_to 'Destroy', post_path(post), data: {
|
||||
|
|
|
|||
|
|
@ -9,11 +9,10 @@ random thoughts longer than miniblog length will go here :)<br><br>
|
|||
<hr>
|
||||
<% @scraps.each do |scrap| %>
|
||||
|
||||
(<%= link_to 'Read', scrap_path(scrap) %>) <br>
|
||||
|
||||
<%= truncate(scrap.text.to_plain_text, length: 350) %> | <%= time_ago_in_words(scrap.created_at) %> ago
|
||||
(<%= link_to 'Read', scrap_path(scrap) %>) <br> | | <%= time_ago_in_words(scrap.created_at) %> ago
|
||||
<br>
|
||||
<% 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: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue