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.
精彩评论