mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-21 15:40:58 +00:00
1 line
1.7 KiB
JSON
1 line
1.7 KiB
JSON
[{"user_id": 19854, "stars": [], "topic_id": 39243, "date_created": 1307996414.203799, "message": "I'm writing my first Rails app and I'm wondering what people tend to do with urls. Using `resources :users` will give me urls like `/users/1`, `/users/1/edit`, and so on, of course. But it seems to me that the nicer looking option is to use `/users/username`, and so on. Do people generally not care about this and go with the default? Do they typically override the default? (Route planning turns out to be harder than I anticipated, so I'll take any advice I can get!)", "group_id": 447, "id": 1383766}, {"user_id": 26065, "stars": [{"date_created": 1308670879.7308421, "user_id": 5928}], "topic_id": 39243, "date_created": 1307996734.1173961, "message": "check out friendlyid if you use active record and mongoid_slug if you are using mongodb. Names might be similar, and they will give you good looking urls through the default rails mechanism. You find them on rubygems.org also check out railscasts.com", "group_id": 447, "id": 1383815}, {"user_id": 19854, "stars": [], "topic_id": 39243, "date_created": 1307996802.4385891, "message": "@martin_sunset great tips, thanks. I'm using ActiveRecord, so I'll look at friendlyid.", "group_id": 447, "id": 1383826}, {"user_id": 32812, "stars": [], "topic_id": 39243, "date_created": 1308022393.3133781, "message": "you can also just override to_param in your model to get urls like that. but you need to make sure to use find_by_whatever in your controllers", "group_id": 447, "id": 1387058}, {"user_id": 3859, "stars": [], "topic_id": 39243, "date_created": 1308080160.0571921, "message": "great question and answer, thanks", "group_id": 447, "id": 1393351}] |