about summary refs log tree commit diff stats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/quotes_controller.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/quotes_controller.rb b/app/controllers/quotes_controller.rb index cad7dfd..be931a0 100644 --- a/app/controllers/quotes_controller.rb +++ b/app/controllers/quotes_controller.rb
@@ -50,6 +50,17 @@ class QuotesController < ApplicationController
50 def show 50 def show
51 @quote = Quote.published.find(params[:id]) 51 @quote = Quote.published.find(params[:id])
52 52
53 set_meta_tags(og: {
54 title: "Quote \##{@quote.id}",
55 type: "article",
56 description: (@quote.content.length <= 300 ? @quote.content : @quote.content[0..299]),
57 url: quote_url(@quote, host: "www.fourisland.com"),
58 article: {
59 published_time: @quote.created_at.iso8601,
60 modified_time: @quote.updated_at.iso8601
61 }
62 })
63
53 respond_to do |format| 64 respond_to do |format|
54 format.html 65 format.html
55 format.json { render :json => @quote } 66 format.json { render :json => @quote }