I managed to get the _form to display inside of the modal and fire off. I'm having trouble with displaying show actions inside of the modal.
The error that I'm receiving is undefined method 'user' for nil:NilClass. The data request is not transferring over to the show action when I click the link_to button. I'll post what I wrote beneath this. Thanks.
posts/_posts.html.erb
<% @post_items.each do |post| %>
<%= link_to image_tag(post.photo.url(:medium), style: 'height: 300px; width: 500px;', lazy: true), post_path(controller: :posts, :action => :show, :id => post.id), remote: true, data: {:toggle => 'modal', :target => '#myModal'} %>
<% end %>
<div id="post-modal" class="modal fade"></div>
<!-- Modal --> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> <h4 class="modal-title" id="myModalLabel">Show Page for Post</h4> </div> <div class="modal-body"> <%= render 'posts/post', :locals => {post: post } %> </div> </div> </div> </div>