Topic: has_many belongs_to issue
I have a users(id,name) and a posts(id,content,user_id, user_ip).
each user has_many :posts and each Post belongs_to :user
I would like to get all users which has posted with user_ip = '127.0.0.1'
what's the best way to get that?
thanx in advance