Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Avoid ActiveSupport::Concern deprecation warnings in lib/glow/filter #1

Merged
merged 1 commit into from
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/glow/filter.rb
View
14 lib/glow/filter.rb
@@ -6,14 +6,14 @@ module Filter
included do
after_filter :flash_to_headers
end
- module InstanceMethods
- def flash_to_headers
- return unless flash.any? && request.xhr?
- type, message = flash.first
- response.headers['X-Message'] = message.to_s.unpack('U*').map{ |i| "&##{i};" }.join
+
+ def flash_to_headers
+ return unless flash.any? && request.xhr?
+ type, message = flash.first
+ response.headers['X-Message'] = message.to_s.unpack('U*').map{ |i| "&##{i};" }.join
response.headers['X-Message-Type'] = type.to_s
- flash.discard # don't want the flash to appear when you reload page
- end
+ flash.discard # don't want the flash to appear when you reload page
end
+
end
end
Something went wrong with that request. Please try again.