您的位置: 新闻频道 Ruby新闻

Ext Scaffold Generator Plugin for Rails

2008-01-24 by 见习记者 xxj
评论(4) 有1044人浏览 rails ext
Martin Rehfeld 发布了Ext for rails 的Generator,新增了MIMETYPE ext_json, 并且继承了 Array 和 ActiveRecord::Base 提供 ext_json 方法。



近来Ext开始越来越红火起来,rails+ext 也许是个不错的选择。

# GET /posts
# GET /posts.ext_json
def index
  respond_to do |format|
    format.html     # index.html.erb (will fire ext_json request)
    format.ext_json { render :json => Post.find(:all).to_ext_json }
  end
end

来自:GL Networks Inside

评论 共 4 条 发表评论

flymonk 2008-01-25 09:39
可能是系统的问题,不用太过苛责赛
laiseeme 2008-01-25 08:58
我也迷糊了一下,java怎么还有#号
darkhucx 2008-01-25 08:50
Ext Scaffold Generator Plugin for Rails 不是标题上写的就是Rails的插件吗?呵呵
wuguoming2004 2008-01-25 08:14
引用

近来Ext开始越来越红火起来,rails+ext 也许是个不错的选择。

Java代码 复制代码

1. # GET /posts
2. # GET /posts.ext_json
3. def index
4. respond_to do |format|
5. format.html # index.html.erb (will fire ext_json request)
6. format.ext_json { render :json => Post.find(:all).to_ext_json }
7. end
8. end

# GET /posts
# GET /posts.ext_json
def index
respond_to do |format|
format.html # index.html.erb (will fire ext_json request)
format.ext_json { render :json => Post.find(:all).to_ext_json }
end
end


来自:GL Networks Inside


什么java代码 明明ruby代码 编辑新闻的也太不负责了吧

发表评论

您还没有登录,请登录后发表评论