Permalink
Browse files

♻️ Add syndicates in a way that does not break existing note partial

  • Loading branch information...
adamdawkins committed Jan 22, 2019
1 parent c8fb81c commit 704b7c79529474ad0abee510b1a99c636fe5f99f
@@ -6,22 +6,6 @@
<% end %>
<% end %>
</div>
<div>
<h3>Syndicates</h3>
<ul>
<% @article.syndicates.each do |syn| %>
<li>
<%= link_to syn.silo.name, syn.url %>
<%= simple_form_for(syn, url: adam_syndicate_path(syn), method: :delete) do |f|%>
<%= f.submit "Delete" %>
<% end %>
</li>
<% end %>
</ul>
<%= simple_form_for(@article.syndicates.build, url: adam_post_syndicates_path(@article)) do |f| %>
<%= f.association :silo %>
<%= f.input :url %>
<% end %>
</div>
<%= render "adam/syndicates/syndicates", post: @article %>
<h1 class="title"><%= @article.title %></h1>
<%= Kramdown::Document.new(@article.content).to_html.html_safe %>
@@ -10,6 +10,7 @@
<% end %>
<% end %>
</div>
<%= render "adam/syndicates/syndicates", post: @note %>
<h1>Preview</h1>
<%= render "notes/note", { note: @note } %>

@@ -0,0 +1,17 @@
<div>
<h3>Syndicates</h3>
<ul>
<% post.syndicates.each do |syn| %>
<li>
<%= link_to syn.silo.name, syn.url %>
<%= simple_form_for(syn, url: adam_syndicate_path(syn), method: :delete) do |f|%>
<%= f.submit "Delete" %>
<% end %>
</li>
<% end %>
</ul>
<%= simple_form_for(Syndicate.new, url: adam_post_syndicates_path(post)) do |f| %>
<%= f.association :silo %>
<%= f.input :url %>
<% end %>
</div>

0 comments on commit 704b7c7

Please sign in to comment.