Refactor the belongs_to and has_many methods to use params hash as well