Skip to content

Instantly share code, notes, and snippets.

@airhorns
Created October 26, 2010 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save airhorns/647608 to your computer and use it in GitHub Desktop.
Save airhorns/647608 to your computer and use it in GitHub Desktop.
User
- has_many :end_of_day_reports
Quote
- has_and_belongs_to_many :end_of_day_reports
- has_many :time_reports
EndOfDayReport
- has_and_belongs_to_many :quotes
- belongs_to :user
- has_many :time_reports
TimeReport
- belongs_to :user
- belongs_to :quote
- belongs_to :end_of_day_report
<%= form_for EndOfDayReport.new do |eod_form| %>
<%= fields_for :quotes, @quotes do |quote_form| %>
<%= fields_for :time_reports, TimeReport.new do |time_form| %>
<%= time_form.hidden_field :user_id, current_user.id %>
.
.
.
<% end %>
<% end %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment