Update resource_controller.rb