app/controllers/sections_controller.rb
def loop_item_names
    @section = Section.find(params[:id])
    authorize! :questions, @section
    @item_names = @section.loop_item_names if @section && @section.looping?  && @section.loop_item_type.present?
    respond_to do |format|
      format.js { render :json => (@item_names ? @item_names.to_json : nil), :callback => params[:callback] }
    end
  end
#Get all the loop item names of the section, if it is a looping section
#to create a delegation (delegates/new.html.erb)
Get all the loop item names of the section, if it is a looping section
to create a delegation (delegates/new.html.erb)
Get all the loop item names of the section if it is a looping section to create a delegation ( delegates / new . html . erb )
def loop_item_names
    @section = Section.find(params[:id])
    authorize! :questions, @section
    @item_names = @section.loop_item_names if @section && @section.looping?  && @section.loop_item_type.present?
    respond_to do |format|
      format.js { render :json => (@item_names ? @item_names.to_json : nil), :callback => params[:callback] }
    end
  end
def loop_item_names @section = Section . find ( params [ :id ] ) authorize! :questions , @section @item_names = @section . loop_item_names if @section && @section . looping? && @section . loop_item_type . present? respond_to do | format | format . js { render :json => ( @item_names ? @item_names . to_json : nil ) , :callback => params [ :callback ] } end end
Get all the loop item names of the section, if it is a looping section
to create a delegation (delegates/new.html.erb)
Get all the loop item names of the section if it is a looping section to create a delegation ( delegates / new . html . erb )