lib/exposure/behaviors/flashing.rb in exposure-0.1.1 vs lib/exposure/behaviors/flashing.rb in exposure-0.1.2
- old
+ new
@@ -34,23 +34,23 @@
private
def custom_flash_for(action_name, action_status)
if flash_message = self.class::FlashMessages["#{action_name}.#{action_status}.html"]
case flash_message
when String
- flash[:message] = flash_message
+ flash[:notice] = flash_message
when Symbol
- flash[:message] = self.send(flash_message)
+ flash[:notice] = self.send(flash_message)
when Proc
- flash[:message] = self.instance_eval(&flash_message)
+ flash[:notice] = self.instance_eval(&flash_message)
end
else
false
end
end
def default_flash_for(action_name, action_status)
if message_proc = self.class::DefaultFlashMessages["#{action_name}.#{action_status}.html"]
- flash[:message] = self.instance_eval(&message_proc)
+ flash[:notice] = self.instance_eval(&message_proc)
end
end
def flash_for(action_name, action_successful)
custom_flash_for(action_name, action_successful) || default_flash_for(action_name, action_successful)
\ No newline at end of file