Sha256: 44c3058a61150b7a8af89ce7a40ba9f6c881dafadc4abb513ddc7233bc272935

Contents?: true

Size: 1.21 KB

Versions: 14

Compression:

Stored size: 1.21 KB

Contents


module Merb::Test::Fixtures

  module Abstract
    
    class SomeModel; end
    
    class Testing < Merb::AbstractController
      self._template_root = File.dirname(__FILE__) / "views"
    end
    
    class DisplayObject < Testing
      def index
        @obj = SomeModel.new
        display @obj
      end
    end
    
    class DisplayObjectWithAction < Testing
      def create
        @obj = SomeModel.new
        display @obj, :new
      end
    end
    
    class DisplayObjectWithPath < Testing
      def index
        @obj = SomeModel.new
        display @obj, "test_display/foo.html"
      end
    end

    class DisplayObjectWithPathViaOpts < Testing
      def index
        @obj = SomeModel.new
        display @obj, :template => "test_display/foo.html"
      end
    end
    
    class DisplayObjectWithMultipleRoots < DisplayObject
      self._template_roots << [File.dirname(__FILE__) / "alt_views", :_template_location]
      
      def show
        @obj = SomeModel.new
        display @obj, nil, :layout=>"alt"
      end
      
      def another
        @obj = SomeModel.new
        display @obj, "test_display/foo.html", :layout=>false
      end
      
      def wonderful
        true
      end
    end
  end

end

Version data entries

14 entries across 8 versions & 1 rubygems

Version Path
merb-core-1.1.3 spec10/public/abstract_controller/controllers/display.rb
merb-core-1.1.3 spec/public/abstract_controller/controllers/display.rb
merb-core-1.1.2 spec10/public/abstract_controller/controllers/display.rb
merb-core-1.1.2 spec/public/abstract_controller/controllers/display.rb
merb-core-1.1.1 spec/public/abstract_controller/controllers/display.rb
merb-core-1.1.1 spec10/public/abstract_controller/controllers/display.rb
merb-core-1.1.0 spec10/public/abstract_controller/controllers/display.rb
merb-core-1.1.0 spec/public/abstract_controller/controllers/display.rb
merb-core-1.1.0.rc1 spec/public/abstract_controller/controllers/display.rb
merb-core-1.1.0.rc1 spec10/public/abstract_controller/controllers/display.rb
merb-core-1.1.0.pre spec/public/abstract_controller/controllers/display.rb
merb-core-1.1.0.pre spec10/public/abstract_controller/controllers/display.rb
merb-core-0.9.6 spec/public/abstract_controller/controllers/display.rb
merb-core-0.9.7 spec/public/abstract_controller/controllers/display.rb