开发者

How do I pass layout false inside respond_to block in Rails?

I'm trying to 开发者_StackOverflow中文版figure out how to make this work. Here is my code, which is not working right now:

  respond_with(@addresses) do |format|
    format.json {render :json=>@addresses, :layout=>false}
  end


The :layout parameter shouldn't be necessary when you're rendering json, xml, etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜