From 8f0f37b4c8abff1ead38f946bb373b50b9be86a5 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 11 Sep 2014 20:10:48 -0500 Subject: [PATCH] campaign for outfit pages --- app/controllers/outfits_controller.rb | 1 + app/views/outfits/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/outfits_controller.rb b/app/controllers/outfits_controller.rb index 7744791d..357b6eca 100644 --- a/app/controllers/outfits_controller.rb +++ b/app/controllers/outfits_controller.rb @@ -83,6 +83,7 @@ class OutfitsController < ApplicationController def show @outfit = Outfit.find(params[:id]) + @campaign = Campaign.current rescue nil respond_to do |format| format.html { render } format.json { render :json => @outfit } diff --git a/app/views/outfits/show.html.haml b/app/views/outfits/show.html.haml index 333cab8f..71166ecd 100644 --- a/app/views/outfits/show.html.haml +++ b/app/views/outfits/show.html.haml @@ -1,5 +1,5 @@ - title(@outfit.name || t('.default_outfit_name')) -- content_for :before_title, campaign_progress +- content_for :before_title, campaign_progress(@campaign) - open_graph :type => 'openneo-impress:outfit', :title => yield(:title), :url => outfit_url(@outfit)