Permalink
Browse files

Correctly include cookie-setting after_filter.

  • Loading branch information...
whitequark committed Jul 21, 2011
1 parent 9b1009d commit 8a010cce64226d397e1a2c5ad421bd2504390d89
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/babilu/generator.rb
View
@@ -5,6 +5,7 @@ module Generator
class << self
def included(base)
base.send :extend, ClassMethods
+ base.send :include, InstanceMethods
end
def generate
@@ -34,15 +35,17 @@ 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
cookies[:locale] = I18n.locale.to_s
end
end
end
-end
+end

0 comments on commit 8a010cc

Please sign in to comment.