Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我很好奇Padrino是如何完成映射的:
get :index do
至:
get '/' do
我很难在源中找到它。
它只是覆盖了该get方法,即:
get
alias old_get get def get(path) if path == :index old_get '/' else old_get path end end