If you are getting an error about ‘undefined method assert_valid_keys’ in Rails :

undefined method `assert_valid_keys' for :time_entry_product:Symbol

… it may be because you have two relationships specified on the same line in your model :

class TimeEntry < ActiveRecord::Base
  belongs_to :time_entry_category, :time_entry_product
end

If you change this so that the relationships are on separate lines, the problem usually goes away :

class TimeEntry < ActiveRecord::Base
  belongs_to :time_entry_category
  belongs_to :time_entry_product
end