モデル User と Pictures があるとします。
特定のユーザーに関連する画像を作成できます。
picture = user.pictures.create
特定の画像の作成時にユーザー インスタンスにアクセスする方法はありますか?
例えば。picture.author.should == user.name
ありがとう
モデル User と Pictures があるとします。
特定のユーザーに関連する画像を作成できます。
picture = user.pictures.create
特定の画像の作成時にユーザー インスタンスにアクセスする方法はありますか?
例えば。picture.author.should == user.name
ありがとう