Skip to content

Instantly share code, notes, and snippets.

@meltzerj
Created April 2, 2011 05:49
Show Gist options
  • Select an option

  • Save meltzerj/899268 to your computer and use it in GitHub Desktop.

Select an option

Save meltzerj/899268 to your computer and use it in GitHub Desktop.
<div class="topic_holder">
<% @video.topics.uniq.each do |topic| %>
<div class ="topic round">
<%= link_to "#{topic.name}", "#", :class => 'topic_link' %>
<% topicable = Topicable.find_by_video_id_and_topic_id(@video.id, topic.id) %>
<%= link_to "x", topicable_path(topicable.id), :method => :delete, :class => 'topic_delete' %>
</div>
<% end %>
</div>
<%= form_for @video, :url => {:action => "update"}, :remote => true do |f| %>
<div class="field">
<%= f.text_field :topic_names, :class => "topic_field" %>
</div>
<%= f.submit "Add Topic" %>
<% end %>
<div id='video_div'>
<%= render 'video', :video => @video %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment