c++ Members of Classes Access Control Constructors for class Member initializer list Destructors for class Static Members Constant Member Self-reference Friend
RESTful风格的路由动词默认有7个(分别为:index, show, create, new, edit, update, destroy)。有时我们需要自定义路由,这时就要用到:on参数。:on参数有三种取值,分别为collection,member,new。
如果想添加一个member方式的路由,可以这样:
代码如下:
resources :photos do
member do
get ‘preview’
end
end
将会添加一个路由:GET请求/ph