私はそのようなjqueryコードを持っています:
jQuery(function($) {
  $(document).ready(function () {
    $('.lol').each(function(index) {
      console.log("#"+$(this).attr("id"));
      $.ajax({ 
        url: "/articles/get_prices/nr="+$(this).attr("nr")+"&br="+$(this).attr("br")+"&type="+$(this).attr("type"), 
        type: "GET", 
        data: {},
        success: function(text)
        {
          $("#"+$(this).attr("id")).html(text);
        },
        error: function(){
          alert('Ошибка javascript');
        },
        dataType : "html"
      });
    });
  });
});
そしてそのようなhamlコード
.box{:id => art.ART_ARTICLE_NR.gsub(/[^0-9A-Za-z]/, '')}
方法
def get_prices()
    nr = params[:nr]
    br = params[:br]
    type = params[:type]
    @pr = find_price(nr, br, type)
    respond_to do |format|
      format.html { render :partial=>"search_trees/price" }
    end
  end
このdivjquery値を設定する必要がありますが、すべて動的であるため、ページが読み込まれた後、dbに移動し、id(各ボックスに別のもの)を介して値を設定します。