From 542b235f238d5f1837b65b529cf53e31efbc228d Mon Sep 17 00:00:00 2001 From: jomo Date: Fri, 24 Apr 2015 00:28:01 +0200 Subject: show info page update time --- app/views/info/show.html.erb | 1 + db/schema.rb | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/info/show.html.erb b/app/views/info/show.html.erb index 3614d93..60258f9 100644 --- a/app/views/info/show.html.erb +++ b/app/views/info/show.html.erb @@ -4,6 +4,7 @@ <% end %>

<%= title @info.title %>

+Last edited <%= ago @info.updated_at %>.
<%= render_trusted_md(@info.content).html_safe %> diff --git a/db/schema.rb b/db/schema.rb index 6cf8ed5..cb4291e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150309221221) do +ActiveRecord::Schema.define(version: 20150423221613) do create_table "blogposts", force: true do |t| t.string "title" @@ -65,8 +65,10 @@ ActiveRecord::Schema.define(version: 20150309221221) do end create_table "info", force: true do |t| - t.string "title" - t.text "content" + t.string "title" + t.text "content" + t.datetime "created_at" + t.datetime "updated_at" end create_table "labels", force: true do |t| -- cgit v1.2.3