Sha256: a4a55f6628b4edd243bebcb74c9e97ec8b21fadbac883d8d517d29d44a9121c5

Contents?: true

Size: 389 Bytes

Versions: 7

Compression:

Stored size: 389 Bytes

Contents

module Happy
  class Controller
    module Cascadable
      def method_missing(name, *args, &blk)
        if @parent_controller && @parent_controller.respond_to?(name)
          @parent_controller.send(name, *args, &blk)
        else
          super
        end
      end

      def respond_to?(name)
        super || @parent_controller.try(:respond_to?, name)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
happy-0.1.0.pre27 lib/happy/controller/cascadable.rb
happy-0.1.0.pre25 lib/happy/controller/cascadable.rb
happy-0.1.0.pre24 lib/happy/controller/cascadable.rb
happy-0.1.0.pre23 lib/happy/controller/cascadable.rb
happy-0.1.0.pre22 lib/happy/controller/cascadable.rb
happy-0.1.0.pre21 lib/happy/controller/cascadable.rb
happy-0.1.0.pre20 lib/happy/controller/cascadable.rb