Reputation: 3133
In Ruby on Rails, what does the # symbol mean in the following:
root to: 'stores#index', as: 'store'
I've looked everywhere for an explanation, but just can't find anything! I'm sure it's quite simple.
Upvotes: 1
Views: 166
Reputation: 9362
Refer here, the 'stores#index' would redirect to index
action of stores
controller
Upvotes: 1
Reputation: 2780
The # is used to denote that you are choosing the action (method) index from the controller (class) store. There's a little bit more to it than that, but essentially the store\index.html is routed to by the rails framework. This is part of the RESTful architecture.
Upvotes: 2