Rails: How to make available parent attribute in setter method
Context: I have a company model with many projects , having many tasks . The company also has many employees , which in turn have many tasks . Schema: Problem: I'm building a form to create a project where the user can add multiple tasks . Upon submission the form should create a single project record, one or more task records with hours and employee_id attributes and (!) check if the employee name already exists in the database or create a new one. I've approached this by adding jquery autocomplete to the form and defining a virtual attribute with a getter and setter method in my Task model.