I have three models:User,Action,Comment.User have has_many relation with the Action,this is true.A user can make many comments for different action,an action can have many comments belonging to it.So can i use two has many and two belongs_to to set the relationship among the three models like following? has_many :comments in User model has_many :comments in Action model belongs_to :user belongs_to :action in the Comment model.
That is the Comment has two foreign keys.