Sha256: 633eb1bc0eb4c27e8535e38e4d23f7c95223ed61f3cb2c901da1e1a0a082f8f4
Contents?: true
Size: 395 Bytes
Versions: 9
Compression:
Stored size: 395 Bytes
Contents
# http://stackoverflow.com/questions/9953887 module Responders::JsonResponder protected # simply render the resource even on POST instead of redirecting for ajax def api_behavior if post? display resource, :status => :created # render resource instead of 204 no content elsif put? || delete? display resource, :status => :ok else super end end end
Version data entries
9 entries across 9 versions & 1 rubygems