Skip to content

Possible bug? #57

@ssr124

Description

@ssr124

I'm seeing strange behaviour when running the following piece of code. Ramaze seems to initialize the controller 4 times (and invoke the action 4 times as well!) when a method returns a response via the "respond!" method. Browsing to / shows "main.ctor" and "main.index" messages once in the terminal, but browsing to /foo shows "main.ctor" and "main.foo" 4 times.

ver - 2012.12.08


require 'ramaze'

class MainController < Ramaze::Controller
    def initialize
        puts "main.ctor"
    end

    def index
        puts "main.index"
        "index page"
    end

    def foo
        puts "main.about"
        respond! "no action", 404
    end
end

Ramaze.start

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions