title: collection_check_boxes is not working throwing undefined method error (Ruby on Rails)
body: <p>I have two controller one is <code>project_controller.rb</code> and another one is <code>service_controller.rb</code>. So I want to store <code>services_ids</code> into the <code>project</code>.</p>
  
  <p>codes of <code>project_controller.rb</code></p>
  
  <pre><code>def get_service_list
    @project = Project.find(params[:project_id])
  end
  </code></pre>
  
  <p>codes of <code>project.rb</code> model</p>
  
  <pre><code>class Project &lt; ActiveRecord::Base
    attr_accessible :name, :services_ids, :user_id, :vendor_id
    has_many :services
  end
  </code></pre>
  
  <p>codes of <code>service.rb</code> Model</p>
  
  <pre><code>class Service &lt; ActiveRecord::Base
    attr_accessible :name, :vendor_id
    belongs_to :project
  end
  </code></pre>
  
  <p>codes of <code>get_service_list.html.erb</code></p>
  
  <pre><code>&lt;%= form_for(@project) do |f| %&gt;
    &lt;%= f.collection_check_boxes :services_ids, Service.all, :id, :name %&gt;
    &lt;%= f.submit %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>But its throwing this error <code>undefined method collection_check_boxes for</code> <code>#&lt;ActionView::Helpers::FormBuilder:0x9e996d0&gt;</code></p>
  
  <p>I followed <a href="https://stackoverflow.com/questions/17140274/undefined-method-collection-check-boxes">Stackoverflow</a> and <a href="http://api.rubyonrails.org/classes/ActionView/Helpers/FormBuilder.html#method-i-check_box" rel="nofollow noreferrer">Rails API</a> links</p>
  
  <p><strong><em>Full error Stack</em></strong></p>
  
  <pre><code>NoMethodError in Projects#get_service_list
  
  Showing /home/test/ROR/vms/app/views/projects/get_service_list.html.erb where line #5 raised:
  
  undefined method `collection_check_boxes' for #&lt;ActionView::Helpers::FormBuilder:0xacdc9b8&gt;
  
  Extracted source (around line #5):
  
  2: 
  3:    
  4:    &lt;!-- %= collection_check_boxes(:projects, :services_ids,Service.all, :id, :name) % --&gt;
  5:    &lt;%= f.collection_check_boxes :projects, :services_ids, Service.all, :id, :name_with_initial %&gt;
  6:    
  7:    &lt;%= f.submit %&gt;
  8: 
  
  Rails.root: /home/test/ROR/vms
  Application Trace | Framework Trace | Full Trace
  
  app/views/projects/get_service_list.html.erb:5:in `block in _app_views_projects_get_service_list_html_erb___693653039_90594350'
  app/views/projects/get_service_list.html.erb:1:in `_app_views_projects_get_service_list_html_erb___693653039_90594350'
  </code></pre>
  
  <p>Please help.. Thanks in advance</p>