<% if @course %> $("#course-boardlist_new").html('<%= escape_javascript( render :partial => 'course_show_detail', :locals => {:topics => @topics, :is_course => 1, :is_board=>1}) %>'); <% else %> $("#project-boardlist").replaceWith('<%= escape_javascript( render :partial => 'users/project_boardlist', :locals => {:topics => @topics, :is_course => 1, :is_board=>1}) %>'); <% end %>