Created
September 1, 2012 05:26
-
-
Save adamakhtar/3564542 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Here we want to include Rails Il8n functionality but since the host is a | |
#module and modules cant include other modules, we create an Object instanc | |
#and extend it. | |
#https://github.com/plataformatec/responders/blob/master/lib/responders/flash_responder.rb | |
module FlashResponder | |
class << self | |
attr_accessor :flash_keys, :namespace_lookup, :helper | |
end | |
self.flash_keys = [ :notice, :alert ] | |
self.namespace_lookup = false | |
self.helper = Object.new.extend(ActionView::Helpers::TranslationHelper) | |
... | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment