Use locals in responder. Responder now works out of the box with

Devise
This commit is contained in:
ccocchi 2012-09-13 16:04:43 +02:00
parent 4b61edad64
commit 395a3d7439
1 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ module RablRails
if get?
controller.default_render rabl_options
elsif post?
controller.default_render rabl_options.merge!(status: :created, location: api_location)
controller.default_render rabl_options.merge!(status: :created, location: api_location, locals: { resource: resource })
else
head :no_content
end