def edit
      @element = Element.find(params[:id])
      
      # for dependencies
      if @element.question?
        (3 - @element.conditions.length).times { @element.conditions.build }
        @questions_before_this = @page.questions_before_position(@element.position(@page)) 
      end
      
      respond_to do |format|
        format.js
      end
    end
def edit
      @element = Element.find(params[:id])
      
      # for dependencies
      if @element.question?
        (3 - @element.conditions.length).times { @element.conditions.build }
        @questions_before_this = @page.questions_before_position(@element.position(@page)) 
      end
      
      respond_to do |format|
        format.js
      end
    end
GET /element/1/edit