title: Sidekiq: ArgumentError: When assigning attributes, you must pass a hash as an argument
body: <p>I guess <a href="https://www.google.co.uk/search?q=ArgumentError%3A%20When%20assigning%20attributes%2C%20you%20must%20pass%20a%20hash%20as%20an%20argument.&amp;oq=ArgumentError%3A%20When%20assigning%20attributes%2C%20you%20must%20pass%20a%20hash%20as%20an%20argument.&amp;aqs=chrome..69i57j69i58.597j0j7&amp;sourceid=chrome&amp;es_sm=91&amp;ie=UTF-8" rel="nofollow">this question</a> is common with Rails 4, but my situation is different.</p>
  
  <p>I am using Sidekiq to delay the creation of jobs; think this is possible as with simple data, it works. By means of simple data:</p>
  
  <pre><code>def perform
   Foo.create(bar: "staff")
  end
  </code></pre>
  
  <p>Here's my data with issues:</p>
  
  <p><strong>supports_controller.rb:</strong></p>
  
  <pre><code>def create
   params = support_params // seems to be issues here?
   DelayedJobs.perform_in(1.minutes, current_user.id, params)
   ...
  end
  
  private
  
    def support_params
     params.require(:support).permit(:foo1, :foo2, :foo3)
    end
  </code></pre>
  
  <p><strong>app/workers/delayed_jobs.rb:</strong></p>
  
  <pre><code>class DelayedJobs
    include Sidekiq::Worker
    def perform(user_id, params)
      u = User.find(user_id)
      support = u.supports.build(params)
      Support.create(support) // create and save to db
    end
  end
  </code></pre>
  
  <p>Via web (localhost:3000/sidekiq/scheduled, I see the details. Great. But after a minute it goes to retries with the error. Any help on this one?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>In the sidekiq web argument:</p>
  
  <blockquote>
    <p>40, {"foo1"=>"a", "foo2"=>"b", "foo3"=>"c"}</p>
  </blockquote>
  
  <p>Why is that the <code>user_id</code> (40) is outside?</p>