Skip to content

Instantly share code, notes, and snippets.

@zr2d2
Last active December 23, 2015 15:38
Show Gist options
  • Select an option

  • Save zr2d2/6656356 to your computer and use it in GitHub Desktop.

Select an option

Save zr2d2/6656356 to your computer and use it in GitHub Desktop.
def feed_markers
markers = @content.submissions.map do |s|
content_tag('span', {:class => 'marker-feed', 'data-feed-id' => s.id, :style => 'margin-right: 12px;'}) do
hidden_field_tag("feed_id[#{s.feed_id}]", s.feed_id) +
content_tag('span', :class => 'label') do
"#{s.feed.name} #{link_to '<i class="icon-remove"></i>'.html_safe, '#'}".html_safe
end
end
end
markers.join.html_safe
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment