implement sql builder joins with complex arguments
add comment for ActiveRecord.joins method