Skip to content
Browse files

Correctly include cookie-setting after_filter.

  • Loading branch information...
1 parent 9b1009d commit 8a010cce64226d397e1a2c5ad421bd2504390d89 @whitequark whitequark committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/babilu/generator.rb
View
7 lib/babilu/generator.rb
@@ -5,6 +5,7 @@ module Generator
class << self
def included(base)
base.send :extend, ClassMethods
+ base.send :include, InstanceMethods
end
def generate
@@ -34,10 +35,12 @@ def reuse_locales?
end
module ClassMethods
- def self.included(controller)
+ def self.extended(controller)
controller.send(:after_filter, :set_locale_cookie)
end
+ end
+ module InstanceMethods
private
def set_locale_cookie
@@ -45,4 +48,4 @@ def set_locale_cookie
end
end
end
-end
+end

0 comments on commit 8a010cc

Please sign in to comment.
Something went wrong with that request. Please try again.