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
" <div id='\#{comments_container_id}' class=\"comments_container\">Loading comments ...</div>\n <script type='text/javascript'>\n Disussion.loadComments('\#{polymorphic_url([commentable, :comments])}', '\#{comments_container_id}');\n </script>\n EOF\n else\n content_tag :div, id: comments_container_id do\n render :partial => \"discussion/comments/list_with_form\", locals: {commentable: commentable, contriner_id: comments_container_id}\n end\n end\nend\n".html_safe
|