title: Subtracting one Array from another in Ruby
body: <p>I've got two arrays of Tasks - created and assigned. 
  I want to remove all assigned tasks from the array of created tasks.
  Here's my working, but messy, code:</p>
  
  <pre><code>    @assigned_tasks = @user.assigned_tasks
      @created_tasks = @user.created_tasks
  
      #Do not show created tasks assigned to self
      @created_not_doing_tasks = Array.new
      @created_tasks.each do |task|
          unless @assigned_tasks.include?(task)
              @created_not_doing_tasks &lt;&lt; task
          end
      end
  </code></pre>
  
  <p>I'm sure there's a better way. What is it?
  Thanks :-)</p>