Activity Graph

Page 1 of 1


[00:52:44] tyul: Ping timeout: 250 seconds
[14:56:40] tyul: has joined #RubyOnRails
[14:58:05] tyul: Using npm it is possible to define alias to run commands like "npm start", "npm test", "npm run_custom_script", etc... is there a way to do something like that with rails? something like "rails mytask"
[14:59:58] tyul: matthewd: hmm, I am going to google that, thanks
[18:08:24] tyul: Ping timeout: 250 seconds


[18:33:57] tyul: has joined #RubyOnRails
[18:37:07] tyul: What is the best way to model something like a user's address book, in which a user has many addresses but one of them was chosen as the main address. There are many kind of things that have this pattern and I need to work with something similar. When I had to do that in a company I worked before, a guy said that it was a bad idea to put a foreign key on the user table to one of the addresses because would give a "lock" when delet
[18:38:41] tyul: he said it was better to use a boolean "default" field. But the problem is that more than one address can have default true which is a bad thing
[18:39:12] tyul: but we didn't use rails at the time, so I would like to know what is the best way to deal with this pattern using rails
[21:33:32] tyul: hey guys I am trying to model an address book where one of the addresses can be the default one, is this a good approach? https://gist.github.com/tiagofumo/b1792a7ab2f26686c4e16f614befb26d