やりたいこと:1人のユーザーが複数の住所を登録する場合に備えて、UserとShippingAddressのリレーションを作る。
参照:http://ruby-rails.hatenadiary.com/entry/20141203/1417601540
User.rbとShipping_address.rbにそれぞれリレーションを加えていく。
Shipping_address.controllerで保存の際にUser_idのリレーションを作る。
Qeustion:@shipping_address.user = current_user
の.user = はactiverecordのメソッド。
activerecordのメソッドは下記を参照:
http://www.atmarkit.co.jp/ait/articles/1405/30/news036_3.html
http://qiita.com/Yama-to/items/4696e9d43ebec6012129