Sha256: 4e9c77e952196b9e27abe83c06eb9b4509f606755b0df194fd532637576f3eb6

Contents?: true

Size: 1.05 KB

Versions: 23

Compression:

Stored size: 1.05 KB

Contents

module Tags::SocialFeedTags
  include TrustyCms::Taggable

  desc %{Instagram posts feed

        *Usage:*
<pre><code><r:instagram_posts tag="culturaltrust">/code></pre>}
  tag "instagram_posts" do |tag|
    posts = Rails.cache.fetch("instagram_posts/#{tag.attr['tag']}", expires_in: 5.minutes) do
      InstagramFeedService.new.get_feed_for_tag(tag.attr['tag'])
    end
    request.env["action_controller.instance"].render_to_string :partial => "social/instagram_posts",
                                                               :locals => {:posts => posts}

  end

  desc %{Twitter posts feed

        *Usage:*
<pre><code><r:twitter_posts tag="culturaltrust">/code></pre>}
  tag "twitter_posts" do |tag|
    posts = Rails.cache.fetch("twitter_posts/#{tag.attr['tag']}", expires_in: 5.minutes) do
      TwitterFeedService.new.get_feed_for_tag(tag.attr['tag'])
    end
    request.env["action_controller.instance"].render_to_string :partial => "social/twitter_posts",
                                                               :locals => {:posts => posts}

  end

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
trusty-festivity-extension-2.6.3 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.6.2 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.6.1 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.6 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.19 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.18 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.17 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.16 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.15 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.14 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.13 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.12 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.11 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.10 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.9 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.8 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.7 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.6 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.5 lib/tags/social_feed_tags.rb
trusty-festivity-extension-2.5.4 lib/tags/social_feed_tags.rb