<NME> filters.rb
<BEF> # encoding: utf-8

module Rango
  module FiltersMixin
    def self.included(controller)
      controller.extend(ClassMethods)
    end

    # @since 0.0.2
    def run_filters(name, method)
      # Rango.logger.debug(self.class.instance_variables)
      # Rango.logger.inspect(name: name, action: action)
      self.class.get_filters(name).each do |filter_method, options|
        unless options[:except] && options[:except].include?(action)
          if filter_method.is_a?(Symbol) && self.respond_to?(filter_method)
            Rango.logger.info("Calling filter #{filter_method} for controller #{self}")
            self.send(filter_method)
          elsif filter_method.respond_to?(:call)
            Rango.logger.info("Calling filter #{filter_method.inspect} for controller #{self}")
            self.instance_eval(&filter_method)
          else
            Rango.logger.error("Filter #{filter_method} doesn't exists!")
          end
        end
      end
    end
    
    module ClassMethods
      def inherited(subclass)
        inherit_filters(subclass, :before)
      def inherited(subclass)
        subclass.before_filters.replace(self.before_filters)
        subclass.after_filters.replace(self.after_filters)
        super
      end

      # @since 0.2
      # we can't use class variables because they
      # are shared between parent and child classes
      def before_filters
        @before_filters ||= Hash.new
      end

      # @since 0.2
      def after_filters
        @after_filters ||= Hash.new
      end

      # before :login
      # before :login, except: [:send]
      # @since 0.0.2
      def before(action = nil, options = Hash.new, &block)
        self.before_filters[action || block] = options
      end

      # @since 0.0.2
      def after(action = nil, options = Hash.new, &block)
        self.after_filters[action || block] = options
      end

      # @since 0.0.2
      def get_filters(type)
        self.send("#{type}_filters")
      end
    end
      attribute :before_display_filters, Array.new
      attribute :after_display_filters, Array.new
    end
  end  
end

<MSG> Fixed filters

<DFF> @@ -6,6 +6,13 @@ module Rango
       controller.extend(ClassMethods)
     end
 
+    # for Rango::Controller
+    def process_action(method)
+      self.run_filters(:before, method)
+      super(method)
+      self.run_filters(:after, method)
+    end
+
     # @since 0.0.2
     def run_filters(name, method)
       # Rango.logger.debug(self.class.instance_variables)
@@ -24,7 +31,7 @@ module Rango
         end
       end
     end
-    
+
     module ClassMethods
       def inherited(subclass)
         inherit_filters(subclass, :before)
@@ -66,5 +73,5 @@ module Rango
       attribute :before_display_filters, Array.new
       attribute :after_display_filters, Array.new
     end
-  end  
+  end
 end

Fixed filters