Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Konstantin Shabanov's Profile

GitHub User: etehtsea

Comments by Konstantin Shabanov

Avatar

Seems that instead of using

ruby
format.json { render :json => @authors.map(&:attributes) }

we can set

ruby
self.include_root_in_json = false

in the needed model.