質問

私は3.0.0.beta

レールを使用します

RJSを書き込むための新たな構文がありますが、ここでは一例です。

  def remote_create
    @photo = Photo.new(params[:photo])

    respond_to do |format|
      if @photo.save
        # add @photo's thumbnail to last import tag
        format.js {
          render :update do |page|
            page.insert_html :bottom, 'polaroids' , :partial    => 'polaroid', :locals => {:photo => @photo}
          end 
        }
      else
        #...
      end
    end
  end

他のヒント

レール3 IRTのRJSのための任意の構文の変更について

わからないが、私はrailscasts.comでオーバーに沿って、次のお勧めします - 彼はレール3のすべての新機能のビデオを投稿してJSを処理/レンダリングする方法上の任意の更新がある場合はされています私は彼がそれにエピソードをやるだろうと確信しています。

scroll top