  def on_toys_moved
    Log.add_info(request, params.inspect)

    return unless request.post?

    unless @login_user.nil?
      begin
        toy = Toy.find(params[:id])
      rescue
        toy = nil
      end

      unless toy.nil?
        attrs = ActionController::Parameters.new({x: params[:x], y: params[:y]})
        toy.update_attributes(attrs.permit(Toy::PERMIT_BASE))
      end
    end

    render(:text => '')
  end
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.