app/controllers/sections_controller.rb
# => action to show preview of the section
> action to show preview of the section
> action to show preview of the section
def preview
    @section = Section.find(params[:id], :include => [ {:questions => :answer_type}, :questionnaire_part ])
    respond_to do |format|
      format.html
      format.js
    end
  end
def preview @section = Section . find ( params [ :id ] , :include => [ { :questions => :answer_type } , :questionnaire_part ] ) respond_to do | format | format . html format . js end end
> action to show preview of the section
> action to show preview of the section