Son los mismos que habia pasado anteriormente:
El archivo se llama: "create.js.rjs"
----------------------------------------------------------------------------------------------------------------------------
page.select("#notice").each {|notice| notice hide }
page.replace_html('cart', render(@cart))
page[:cart].visual_effect :blind_down if @cart.total_items == 1
page[:current_item].visual_effect :hightlight,
                                                       :startcolor =>
"#88ff88",
                                                       :endcolor   =>
"#114411"

----------------------------------------------------------------------------------------------------------------------------
Y dentro del controlador tengo lo siguiente en create

  def create
      @cart = current_cart
      product = Product.find(params[:product_id])
    @line_item = @cart.add_product(product.id)
    respond_to do |format|
      if @line_item.save
        format.html { redirect_to(store_url) }
        format.js   { @current_item = @line_item }
        format.xml  { render :xml => @line_item,
                            :status => :created,
                            :location => @line_item }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @line_item.errors, :status =>
:unprocessable_entity }
      end
end
-------------------------------------------------------------------------------------------------------------------------------
_______________________________________________
Ruby mailing list
[email protected]
http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar

Responder a