diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a6c8304..249723a 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -14,4 +14,10 @@ module ApplicationHelper
render "shared/flash"
end
end
+
+ def updated_at(object)
+ return "" if object.created_at == object.updated_at
+
+ object.updated_at.strftime("%Y-%m-%d %H:%M")
+ end
end
diff --git a/app/views/blog_posts/show.html.erb b/app/views/blog_posts/show.html.erb
index a9131a0..44e9ff0 100644
--- a/app/views/blog_posts/show.html.erb
+++ b/app/views/blog_posts/show.html.erb
@@ -3,6 +3,7 @@
<%= @blog_post.content %>
<%= link_to "Edit", edit_blog_post_path(@blog_post) if @blog_post.user == current_user %>
+ <%= "Updated at #{updated_at(@blog_post)} | " %>
<%= link_to @blog_post.created_at.strftime("%Y-%m-%d %H:%M"), @blog_post %>
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 8e427d1..e3e3bb0 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -45,7 +45,6 @@ Rails.application.configure do
# config.action_cable.url = "wss://example.com/cable"
# config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = false
config.assume_ssl = true