¿Cómo especifico ": layout => false" en Rails 'respond_with?
Tengo esta configuración:
class UsersController < InheritedResources::Base
respond_to :html, :js, :xml, :json
def index
@users = User.all
respond_with(@users)
end
end
Ahora estoy tratando de hacerlo así, siparams[:format] =~ /(js|json)/
, render :layout => false, :text => @users.to_json
. ¿Cómo hago eso conrespond_with
orespond_to
y los recursos heredados?