Table A: user B table: user_info
Purpose: I want to return the numerical value of a specific column (user_main_id in this case) of table B
manner: Only @user_session of A table is prepared.
controller
API display name: user.find_by(user_id: @user_session.record.id).user_main_id
What is important about the contents of @user_session!
Reference URL https://qiita.com/tsuchinoko_run/items/f3926caaec461cfa1ca3
Recommended Posts