Displaying 1 result from an estimated 1 matches for "taskschedules_path".
2011 May 17
5
has_many through question
...rd::Base
has_many :taskschedules, :through => :areas
has_many :areas
end
class Taskschedule < ActiveRecord::Base
has_many :services, :through => :areas
has_many :areas
end
Following View
Taskschedule#new
<h2>New Taskschedule</h2>
<%= form_for @taskschedule, :url=>taskschedules_path do |f| %>
<p>Area: <%= f.text_field :name %></p>
<% for service in Service.find(:all) %>
<p><%= check_box_tag :service_ids, service.id,
@taskschedule.services.include?(service), :name =>
''taskschedule[service_ids][]'' -%> <%= service...