This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CarrierWave.configure do |config| | |
if Rails.env.production? | |
CarrierWave::Uploader::Base.storage_engines = :file | |
elsif Rails.env.heroku_staging? | |
config.fog_provider = 'fog-aws' | |
config.fog_credentials = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def media_video_link_content( guide ) | |
blank_link = guide.send("video_#{I18n.locale}").blank? | |
tag = blank_link ? 'div' : 'a' | |
html_option = { :class => 'video_link pull-left' } | |
html_option.merge!( :href => guide.video_link ) if tag == 'a' | |
content_tag( tag, html_option ) do | |
#TODO refactory with including portrait_files | |
if guide.portrait.includes(:portrait_files).present? | |
content_tag( :div, :class => 'guide_image', :style => 'position:relative' ) do | |
concat( cl_image_tag(asset_path("play-2.png"), style: "position:absolute;height:128px;opacity:0", class: 'overlay') ) unless blank_link |
NewerOlder