lib/locomotive/admin_responder.rb in locomotive_cms-0.0.3.3 vs lib/locomotive/admin_responder.rb in locomotive_cms-0.0.4.beta1
- old
+ new
@@ -1,12 +1,12 @@
require 'responders'
module Locomotive
class AdminResponder < ::ActionController::Responder
-
+
include ::Responders::FlashResponder
-
+
def api_behavior(error)
raise error unless resourceful?
# generate flash messages
set_flash_message!
@@ -18,11 +18,11 @@
elsif post?
display resource, :status => :created, :location => resource_location
else
display({ :notice => controller.flash[:notice] })
end
-
+
controller.flash.discard # reset flash messages !
end
-
+
end
-end
\ No newline at end of file
+end