title: How can I get value from partial?
body: <p>I use a partial as part of my form to create a new task. The partial is a dynamic list (AJAX) of categories so user can select an appropriate category. </p>
  
  <p>I need to have access to categories/category_list/@current_category variable from tasks_controller to assign selected category to a task.</p>
  
  <p><strong>new.html.erb</strong></p>
  
  <pre><code>&lt;%= form_for @task do |form| %&gt;  
    Category:
    &lt;%= render :partial =&gt; 'categories/category_list', :object =&gt; Category.root_list %&gt;  
    ... 
  &lt;% end %&gt;
  </code></pre>
  
  <p><strong>tasks_controller.rb</strong></p>
  
  <pre><code>def create   
    @task = Task.new(params[:task])  
    @task.category_id = ????  
    @task.save 
    ... 
  end
  </code></pre>
  
  <p>Thank you for your help!</p>