3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'app/helpers/discussion/comments_helper.rb', line 3
def (, options={})
remote = options[:remote] || false
= "comments-#{Time.now.to_i}"
if remote
<<-EOF.html_safe
<div id='#{}' class="comments_container">Loading comments ...</div>
<script type='text/javascript'>
Disussion.loadComments('#{polymorphic_url([, :])}', '#{}');
</script>
EOF
else
content_tag :div, id: do
render :partial => "discussion/comments/list_with_form", locals: {commentable: , contriner_id: }
end
end
end
|