Rails:Route
lastmod 2018-08-17created 2015-12-105 edits
List of route
You can check the list of routes with the command below.
root method
Code like the following is used for routing.
This uses the root function of the Base module as a Mixin. For reference, below is the content of that code. 1
module Base
# ...
def root(options = {})
match '/', { :as => :root, :via => :get }.merge!(options)
end
# ...
end
So, rewritten syntactically, it is equivalent to the following.
For reference, to: uses a Symbol.
See also
References
-
On MAC OSX, it is located at
/Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/mapper.rb. ↩