mooreniemi / Transbucket_Rails

:hospital: → :camera: → :thumbsup:
http://www.transbucket.com
10 stars 4 forks source link

threaded discussions on procedure pages #53

Closed mooreniemi closed 8 years ago

mooreniemi commented 8 years ago

https://github.com/elight/acts_as_commentable_with_threading

mooreniemi commented 8 years ago

screenshot 2016-07-12 22 51 17

mooreniemi commented 8 years ago

http://stackoverflow.com/questions/8737693/self-join-eager-loading-recursively

this is why we havent just made comments commentable, but instead are using the _threading gem. performance is pretty bad though. caching has brought it down to 2000 ms or so

mooreniemi commented 8 years ago

still problematic (app/views/comments/new.js.erb):

$("<%= @parent_id ? "#comment-#{@parent_id} " : '#commentable' %>.reply-target").last().append(
  "<%= escape_javascript(render :partial => 'comments/form', :locals => { :comment => @new_comment }) %>"
).focus();
mooreniemi commented 8 years ago

merged into staging at ecd3207c66a970639f0b11122bbfd8433fa7222e