Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from May 6, 2012
Jump to file or symbol
Failed to load files and symbols.
+7 −7
Split
View
@@ -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