Sha256: 7e27e74ec78fa4a7774dea1232fb458de0ef35484358fe37781279830eba981c

Contents?: true

Size: 779 Bytes

Versions: 16

Compression:

Stored size: 779 Bytes

Contents

# -*- encoding : utf-8 -*-

# X+*followers provides a list of all users following X.

include Card::Set::Type::Pointer

format do
  include Card::Set::Type::Pointer::Format
end

format :html do
  include Card::Set::Type::Pointer::HtmlFormat
end

format :html do
  view :core, cache: :never do
    super()
  end
end

def content
  return "" unless left
  items =
    if (left.type_id == SetID) || (left.type_id == CardtypeID)
      set_card = left.default_follow_set_card
      set_card.all_user_ids_with_rule_for(:follow).map do |user_id|
        if left.followed_by?(user_id) && (user = Card.find(user_id))
          user.name
        end
      end.compact
    else
      left.follower_names
    end
  items.map { |item| "[[#{item}]]" }.join "\n"
end

def virtual?
  !real?
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
card-1.94.1 mod/notifications/set/right/followers.rb
card-1.94.0 mod/notifications/set/right/followers.rb
card-1.93.13 mod/notifications/set/right/followers.rb
card-1.93.12 mod/notifications/set/right/followers.rb
card-1.93.11 mod/notifications/set/right/followers.rb
card-1.93.10 mod/notifications/set/right/followers.rb
card-1.93.9 mod/notifications/set/right/followers.rb
card-1.93.8 mod/notifications/set/right/followers.rb
card-1.93.7 mod/notifications/set/right/followers.rb
card-1.93.6 mod/notifications/set/right/followers.rb
card-1.93.5 mod/notifications/set/right/followers.rb
card-1.93.4 mod/notifications/set/right/followers.rb
card-1.93.3 mod/notifications/set/right/followers.rb
card-1.93.2 mod/notifications/set/right/followers.rb
card-1.93.1 mod/notifications/set/right/followers.rb
card-1.93.0 mod/notifications/set/right/followers.rb