开发者

Rails 3 migration - what is the equivalent of this route in the new world

开发者 https://www.devze.com 2023-02-05 12:47 出处:网络
map.resource开发者_运维问答 :account, :controller => \"users\" That is, how do I map the resource account to the users controller?
map.resource开发者_运维问答 :account, :controller => "users"

That is, how do I map the resource account to the users controller?

Thanks, Chris


Same as before, as stated there in the RailsGuides. You may want to make your resource plural though (assuming you have several accounts, it makes some sense, but after all it depends on the actual meaning you give it).


Exactly as before but without map.:

resource :account, :controller => "users"
0

精彩评论

暂无评论...
验证码 换一张
取 消