Rails 3 and RJS

后端 未结 2 1613
醉话见心
醉话见心 2020-12-05 17:04

I use the rails 3.0.0.beta

Is there any new syntax to write RJS, here is an example

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

    r         


        
2条回答
  •  甜味超标
    2020-12-05 17:08

    here is the screencast http://railscasts.com/episodes/205-unobtrusive-javascript

    UPDATE April 2011: RJS is being extracted for Rails 3.1

    prototype-rails is going to be a gem when Rails 3.1 is out

    Applications using RJS have to add this line to their Gemfile while working against Rails master before the 3.1 release:

    gem 'prototype-rails', :git => 'git://github.com/rails/prototype-rails.git'
    

    more info on ruby on rails's could be found in this article

    prototype-rails on github

提交回复
热议问题