Rails:Route
List of route
아래의 명령으로 Route목록을 확인할 수 있다.
root method
Route시 아래와 같은 코드가 사용된다.
이 것은 Base
모듈의 root
함수를 Mixin으로 사용하는 것이다. 참고로 아래는 해당 코드의 내용이다. 1
module Base
# ...
def root(options = {})
match '/', { :as => :root, :via => :get }.merge!(options)
end
# ...
end
따라서 문법적으로 다시 적는다면 아래와 상통한다 할 수 있다.
참고로 to:
의 경우 Symbol을 사용하는 것이다.
See also
References
-
MAC OSX 기준으로
/Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/mapper.rb
에 존재한다. ↩