RailsCasts Pro episodes are now free!

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.