Walter Davis wrote in post #1182728:
>>> undefined method 'user' for nil:NilClass
>>> then that means @post is nil.
>>>
I made some changes, is this ok?
<div class="modal-body">
<%= image_tag(post.photo.url(:large), style: 'max-width:
570px;') %>
<%= sanitize content_with_emoji(post.body) %>
</div>
$(document).on('page:change', function(){
// shims for the Bootstrap Modal, which is bloody-minded about
caching content per modal
$(document).on('click', '#reusable_modal
[data-dismiss="modal"]',
function (e) {
$(e.target).removeData('bs.modal');
$('#reusable_modal').find('.modal-content').empty();
});
$(document).on('click', '[data-target="#reusable_modal"]',
function(e)
{
$("#reusable_modal").find(".modal-content").load($(this).attr("href"));
});
});
Will it still work if I add comments inside of the modal? Will it
basically clear everything inside of the container? I'll wait for your
response.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b43a127f2240f59f77681d3d3ce7b350%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment