app/controllers/cohorts_controller.rb
# Never trust parameters from the scary internet, only allow the white list through.
Never trust parameters from the scary internet, only allow the white list through.
Never trust parameters from the scary internet only allow the white list through .
def cohort_params
    params.require(:cohort).permit(
      :name,
      :male_id,
      :female_id,
      :enclosure_id
    ).merge(organization_id: current_organization.id)
  end
def cohort_params params . require ( :cohort ) . permit ( :name , :male_id , :female_id , :enclosure_id ) . merge ( organization_id : current_organization . id ) end
Never trust parameters from the scary internet, only allow the white list through.
Never trust parameters from the scary internet only allow the white list through .