Skip to content

Instantly share code, notes, and snippets.

@rosslazer
Created April 25, 2012 04:15
Show Gist options
  • Save rosslazer/2486296 to your computer and use it in GitHub Desktop.
Save rosslazer/2486296 to your computer and use it in GitHub Desktop.
class MatchesController < ApplicationController
def index
@skills = current_user.skills.where('wants.wants_learn' => true)
@array_of_skill_ids = @skills.map
@users = User.joins(:wants).where(:wants=>{:name=>@array_of_skill_ids})
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment