Merge pull request #2414 from Growstuff/dev

Production deploy
This commit is contained in:
Brenda Wallace
2020-02-05 11:40:01 +13:00
committed by GitHub
7 changed files with 10 additions and 9 deletions

View File

@@ -533,7 +533,7 @@ GEM
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.6.1)
unicorn (5.5.2)
unicorn (5.5.3)
kgio (~> 2.6)
raindrops (~> 0.7)
uniform_notifier (1.13.0)

View File

@@ -19,6 +19,10 @@ module PhotosHelper
photo_or_placeholder(garden)
end
def post_image_path(post)
photo_or_placeholder(post)
end
def planting_image_path(planting)
photo_or_placeholder(planting)
end

View File

@@ -1,8 +1,7 @@
= content_for :title, "#{@garden.owner}'s #{@garden}"
- content_for :opengraph do
- @garden.photos.each do |photo|
= tag("meta", property: "og:image", content: photo.fullsize_url)
= tag("meta", property: "og:image", content: garden_image_path(@garden))
- if @garden.description
= tag("meta", property: "og:description", content: og_description(@garden.description))
= tag("meta", property: "og:title", content: "#{@garden.owner}'s #{@garden}")

View File

@@ -1,7 +1,6 @@
= content_for :title, "#{@harvest.crop} harvested by #{@harvest.owner}"
- content_for :opengraph do
- @harvest.photos.each do |photo|
= tag("meta", property: "og:image", content: photo.fullsize_url)
= tag("meta", property: "og:image", content: harvest_image_path(@harvest))
= tag("meta", property: "og:image:user_generated", content: "true")
= tag("meta", property: "og:title", content: "#{@harvest.crop} harvested by #{@harvest.owner}")
= tag("meta", property: "og:type", content: "website")

View File

@@ -1,7 +1,6 @@
= content_for :title, "#{@planting.crop} in #{@planting.location}"
- content_for :opengraph do
- @planting.crop.photos.limit(3).each do |photo|
= tag("meta", property: "og:image", content: photo.fullsize_url)
= tag("meta", property: "og:image", content: planting_image_path(@planting))
= tag("meta", property: "og:title", content: "#{@planting.crop} in #{@planting.location}")
- if @planting.description
= tag("meta", property: "og:description", content: og_description(@planting.description))

View File

@@ -1,5 +1,6 @@
= content_for :title, @post.subject
- content_for :opengraph do
= tag("meta", property: "og:image", content: post_image_path(@post))
= tag("meta", property: "og:image", content: avatar_uri(@post.author, 200))
= tag("meta", property: "og:description", content: og_description(@post.body))
= tag("meta", property: "og:title", content: @post.subject)

View File

@@ -1,7 +1,6 @@
- content_for :title, "#{@seed.owner}'s #{@seed.crop} seeds"
- content_for :opengraph do
- @seed.crop.photos.each do |photo|
= tag("meta", property: "og:image", content: photo.fullsize_url)
= tag("meta", property: "og:image", content: seed_image_path(@seed))
- if @seed.description
= tag("meta", property: "og:description", content: og_description(@seed.description))
= tag("meta", property: "og:image", content: "#{@seed.owner}'s #{@seed.crop} seeds")