title: Rails, X-Editable not passing correct params in AJAX call
body: <p>I have been looking at this for 2 days now. I have an app in Rails 4.2.5 and ruby 2.1.7.
  I am trying to implement inline editing with X-Editable.</p>
  
  <p>I am not using any gems, just importing the relevant files with:</p>
  
  <pre><code>&lt;link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"&gt;
  
  &lt;script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"&gt;&lt;/script&gt;
  
  &lt;!-- x-editable (bootstrap version) --&gt;
  &lt;link href="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.4.6/bootstrap-  editable/css/bootstrap-editable.css" rel="stylesheet"/&gt;
  &lt;script src="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.4.6/bootstrap-editable/js/bootstrap-editable.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>In my view I have:</p>
  
  <pre><code>&lt;a href="#" class="editable bolbol editable-disabled" data-pk="1" id="amount" data-type="text" data-url="&lt;%=crossingcost_path(crossingcost.id)%&gt;" data-title="Enter Amount"&gt;
    &lt;%= crossingcost.amount %&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>and I'm initializing with</p>
  
  <pre><code>// make amount editable
  $('.bolbol').editable({
  });
  </code></pre>
  
  <p>So far so good, I can access the pop up to edit the value I am looking to edit.</p>
  
  <p>Then I get an error message:</p>
  
  <blockquote>
    <p>ParameterMissing (param is missing or the value is empty: crossingcost)</p>
  </blockquote>
  
  <p>So the parameter hash which is sent is as follows (from the logs): </p>
  
  <p>Parameters:</p>
  
  <pre><code>{
    "name" =&gt; "amount",
    "value" =&gt; "166",
    "pk" =&gt; 1,
    "id" =&gt; "1"
  }
  </code></pre>
  
  <p>whereas as it should likely send something like:</p>
  
  <pre><code>{
    :crossingcost =&gt; {
      "name" =&gt; "amount",
      "value" =&gt; "166",
      "pk" =&gt; 1,
      "id" =&gt; "1"
    }
  }
  </code></pre>
  
  <p>Any ideas as to how to send the correct parameter so that the update action can work properly?</p>
  
  <p>EDIT1: adding controller</p>
  
  <pre><code># PATCH/PUT /crossingcosts/1
  # PATCH/PUT /crossingcosts/1.json
  def update
  
    respond_to do |format|
      if @crossingcost.update(crossingcost_params)
        format.html { redirect_to @crossingcost, notice: 'Crossingcost was successfully updated.' }
        format.json { render :show, status: :ok, location: @crossingcost }
      else
        format.html { render :edit }
        format.json { render json: @crossingcost.errors, status: :unprocessable_entity }
      end
    end
  end
  
  
  
  private
  # Use callbacks to share common setup or constraints between actions.
  def set_crossingcost
    @crossingcost = Crossingcost.find(params[:id])
  end
  
  def set_ticket
    @ticket = Ticket.find(params[:ticket_id])
  end
  
  # Never trust parameters from the scary internet, only allow the white list through.
  def crossingcost_params
    params.require(:crossingcost).permit(:ticket_id, :usermetum_id, :amount,:firm_id)
  end
  
  def crossingcost_params_nested
    params.require(:mynested_crossingcost).permit(:ticket_id, :usermetum_id, :amount,:firm_id)
  end
  </code></pre>